Roles¶
A role is one capability the library needs filled, defined as a vtable in
SolidSyslog<Role>Definition.h. A platform adapter, a Core implementation, or
your own code fills it. Every role has a Null fallback, so an unfilled slot
degrades safely instead of dangling at link time. Core declares the roles below;
one is declared by each TLS platform for itself, at the end.
Each page below is that role's contract - the vtable itself, and a generated diagram of the backends that realise it.
Networking¶
| Role | Does |
|---|---|
| Resolver | turn a host and port into an address |
| Datagram | send one UDP payload |
| Stream | carry bytes over a connection - plain TCP, or TLS layered over it |
| Sender | frame a record and deliver it |
Storage¶
| Role | Does |
|---|---|
| Buffer | hold records between Log and Service |
| Store | store and forward across an outage |
| BlockDevice | block-indexed storage beneath a Store |
| File | the file primitive beneath a BlockDevice |
OS primitives¶
| Role | Does |
|---|---|
| Mutex | guard a Buffer shared across tasks |
| AtomicCounter | the RFC 5424 sequenceId source |
Evidence and integrity¶
| Role | Does |
|---|---|
| StructuredData | emit one RFC 5424 SD element |
| SecurityPolicy | seal and open stored records |
Declared per platform¶
The credentials vtable supplies a TLS Stream with its trust anchors, its client
credential, and any pinned peer fingerprints. Each TLS platform declares its own
rather than sharing one, because the material is typed by the backend: what
Install configures is an SSL_CTX under OpenSSL and an mbedtls_ssl_config
under Mbed TLS, and no neutral vtable can carry either.
A backend fetches the material when a connection is being made and lets go of it when the connection ends, so a deployment can keep credentials out of memory in between. A file, a caller-built handle, a secure element and a keyring are all backends of this one role.
| Contract | Platform |
|---|---|
| OpenSSL credentials | OpenSSL |
| Mbed TLS credentials | Mbed TLS |
What a TLS Stream must do with them, whichever platform provides it, is the TLS obligations contract.
Bring your own¶
Filling a role is implementing its vtable. Porting covers the anatomy of an adapter and the invariants every one honours, and links each contract to the backends that already realise it.
Which platform fills a role on your target is the platform × capability matrix.
Or let us fill it.
Nothing shipped backs the role you need? We write the platform adapter for you - and the tests that prove it against the contract. Talk to us about it.