Skip to content
«interface»SolidSyslogBufferCircularBufferCorePassthroughBufferCorePosixMessageQueueBufferPosixNullBufferCore · no-opSolidSyslogCore

Struct SolidSyslogBuffer

ClassList > SolidSyslogBuffer

  • #include <SolidSyslogBufferDefinition.h>
struct SolidSyslogBuffer
{
    void (*Write)(struct SolidSyslogBuffer* base, const void* data, size_t size);
    bool (*Read)(struct SolidSyslogBuffer* base, void* data, size_t maxSize, size_t* bytesRead);
};

Detailed Description

Vtable an implementation embeds as its first member (base) and downcasts from.

Write and Read carry the SolidSyslogBuffer_Write / SolidSyslogBuffer_Read contract; an implementation that queues must make the two sides mutually safe itself, since Service (Read) and Log (Write) can run on different tasks. Read returns false for a head record too large for the caller's buffer and reports it via SolidSyslog_Error (buffer-backend-failed) - that state cannot arise under correct configuration, so it must not be silent.

Records come back in the order they went in, and one Read delivers exactly the bytes one Write was given: nothing downstream re-orders or re-frames them. Write cannot refuse a record, since it has no way to say so, which leaves the overflow policy and whether a drop is reported to the implementation.

Public Attributes Documentation

Read

bool(* SolidSyslogBuffer::Read) (struct SolidSyslogBuffer *base, void *data, size_t maxSize, size_t *bytesRead);

Write

void(* SolidSyslogBuffer::Write) (struct SolidSyslogBuffer *base, const void *data, size_t size);


The documentation for this class was generated from the following file Core/Interface/SolidSyslogBufferDefinition.h