package
0.0.0-20240701064118-96e69a6460fb
Repository: https://github.com/relex/slog-agent.git
Documentation: pkg.go.dev

# Functions

EnableTestMode turns on test mode with very short timeout and minimal retry delay.

# Constants

Common labels for logging.
Common labels for logging.
Common labels for logging.
Common labels for logging.
Common labels for logging.
Common labels for logging.
Common labels for logging.
Common labels for logging.
For testing and experiments.

# Variables

BufferMaxNumChunksInMemory is the max numbers of of loaded chunks to be held in a queue Disk persistence starts when output queue length hits value / 2, because length reading is delayed and inaccurate.
BufferMaxNumChunksInQueue is the max numbers of of loaded and unloaded chunks to be held in a queue, equal to the max numbers of queued files on disk, because at least all the filepaths need to be held in channel New logs are dropped when the limit is reached e.g.
BufferShutDownTimeout is the duration to wait for LogBuffer to save or send all pending log chunks when shutdown.
ForwarderAckerStopTimeout defines how long to wait for acknowledger to stop.
ForwarderBatchAckTimeout is how long to wait for receiving one batch ACK.
ForwarderBatchSendMinimumSpeed is the minimum speed in bytes/sec to calculate timeout Actual timeout for sending is [base] + [packet length] / [minimal speed per].
ForwarderBatchSendTimeoutBase is how long to wait at least for sending one batch.
ForwarderConnectionTimeout is for establishing a TCP connection to upstream.
ForwarderHandshakeTimeout is for TLS handshake with upstream.
ForwarderMaxPendingChunksForAck is the max number of chunks waiting in cleanup stage before ACK.
ForwarderPingInterval is how often to send an empty request for keep-alive / ping purpose.
ForwarderRetryInterval is how long to wait after a connection is interrupted.
InputFlushInterval defines how long to call flush from input if no log is received.
InputLogMaxMessageBytes defines the maximum length of a log message, if such a field exists (protocol dependent).
InputLogMaxRecordBytes defines the maximum length of a log record from input.
InputLogMinRecordBytesToPool defines the minimum length of a log record to start using object pooling.
IntermediateBufferedChannelSize defines the size of internal buffered channels meant to contain temporary data 0 = unbuffered channels The value has visible performance impact as of Go 1.18; size=10 would cause performance loss by over 20%.
IntermediateBufferMaxNumLogs defines the maximum numbers of log records to buffer at input before flushing through go channels The value affects size of buffers passing down channels Larger number puts pressure on GC and makes context switching worse, e.g.
IntermediateBufferMaxTotalBytes defines the how many bytes can be allowed in the buffer of input log records before forced flushing.
IntermediateChannelTimeout defines the timeout of intermediate channel reads and writes.
IntermediateFlushInterval defines how often for intermediate workers to flush their own states For example, to flush buffer streams into output chunks, or to update internal timer.
ListenerLineBufferSize defines the buffer size in bytes to receive incoming logs.
Version is the version number or name, set by main.