Skip to content
«interface»SolidSyslogBufferPassthroughBufferCore«interface»SolidSyslogSender

File SolidSyslogPassthroughBuffer.h

FileList > Core > Interface > SolidSyslogPassthroughBuffer.h

  • #include "SolidSyslogExternC.h"

Detailed Description

The no-queue Buffer.

Write forwards the record straight to the injected sender inline, so SolidSyslog_Log blocks on the send and returns only once it completes; Read always reports empty because nothing is ever queued, so Service has nothing to drain. This is the simplest wiring for a single-task setup with no store-and-forward - no ring, no mutex, no background drain. The cost is that a slow or blocking sender stalls the logging thread.

Because Write sends on the task that logs, neither hold Service applies reaches it: SolidSyslogConfig.IsDestinationKnown while the collector is unknown, and SolidSyslogConfig.GetCaptureState while the device is undecided. A device that logs before it knows either queues instead.

Service still makes the logger's own reports, and nothing else does, so the task that logs calls SolidSyslog_Service as well - after each Log at the least. A report the sender refuses is held and retried on every pass, and each retry is a send, so a call from the task's main loop lands it when the collector returns rather than at the device's next record. A store behind this buffer would hold only those reports: Write never reaches it, so the records the application logs are still lost in an outage. Wire the Null store; a device that stays on one task but wants a store puts a one-record SolidSyslogCircularBuffer over SolidSyslogNullMutex in front of it instead of this buffer, serviced the same way.

Public Functions Documentation

SolidSyslogPassthroughBuffer_Create

The no-queue Buffer: Write sends inline through sender , so SolidSyslog_Log blocks until the send returns and Service has nothing to drain.

struct SolidSyslogBuffer * SolidSyslogPassthroughBuffer_Create (
    struct SolidSyslogSender * sender
) 

Suits single-task setups with no store-and-forward. sender must outlive the buffer. A NULL sender, or an exhausted pool, falls back to the shared NullBuffer.


SolidSyslogPassthroughBuffer_Destroy

Release the pool slot; does not destroy the injected sender.

void SolidSyslogPassthroughBuffer_Destroy (
    struct SolidSyslogBuffer * base
) 



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