Struct SolidSyslogStore¶
#include <SolidSyslogStoreDefinition.h>
struct SolidSyslogStore
{
bool (*Write)(struct SolidSyslogStore* base, const void* data, size_t size);
bool (*ReadNextUnsent)(struct SolidSyslogStore* base, void* data, size_t maxSize, size_t* bytesRead);
void (*MarkSent)(struct SolidSyslogStore* base);
bool (*HasUnsent)(struct SolidSyslogStore* base);
bool (*IsHalted)(struct SolidSyslogStore* base);
size_t (*GetTotalBytes)(struct SolidSyslogStore* base);
size_t (*GetUsedBytes)(struct SolidSyslogStore* base);
bool (*IsTransient)(struct SolidSyslogStore* base);
};
Detailed Description¶
Store-and-forward vtable.
The Service loop is the only reader: it drains the buffer through Write, then repeatedly ReadNextUnsent / MarkSent as the sender accepts records. ReadNextUnsent and MarkSent form a single read cursor (see below); they are not safe to interleave from two contexts.
Public Attributes Documentation¶
GetTotalBytes¶
Configured capacity, for integrator capacity queries.
GetUsedBytes¶
Bytes currently occupied by retained records.
HasUnsent¶
IsHalted¶
True once a full store under the Halt discard policy has stopped accepting writes.
Service treats a halted store as a hard stop, no drain, no send.
IsTransient¶
True when the store never retains anything (e.g.
NullStore), so a Write rejection means "I never had it, please try the sender." False for stores that actually retain records, where a rejection is the discard policy speaking and the message must NOT bypass older records via a direct-send fallback. Service consults this after a failed Write to decide whether to fall through.
MarkSent¶
Mark the record from the last ReadNextUnsent sent and advance the cursor.
A no-op with no preceding successful read, so on a send failure the caller skips this and the same record is re-read next pass.
ReadNextUnsent¶
Copy the oldest unsent record into data (up tomaxSize , over-long records truncated), setbytesRead , and position the cursor on it for a following MarkSent.
bool(* SolidSyslogStore::ReadNextUnsent) (struct SolidSyslogStore *base, void *data, size_t maxSize, size_t *bytesRead);
Does not consume the record, a repeat call re-reads the same one until MarkSent advances past it. False with bytesRead 0 means nothing unsent.
Write¶
Take a copy of data (size bytes) as an unsent record.
False means not retained: for a retaining store that is the discard policy refusing it (drop-newest, or halted), for a transient store it means "never held, send it directly". Service branches on IsTransient to tell the two apart.
The documentation for this class was generated from the following file Core/Interface/SolidSyslogStoreDefinition.h