Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrClosed = errors.New("Svarog client is closed") ErrInvalidEntry = errors.New("invalid log entry") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New validates local configuration and starts a background publisher. It does not wait for the broker: unavailable connections retry while the queue fills.
func (*Client) Enqueue ¶
Enqueue waits for space in the bounded queue. Success means local acceptance, not broker or database persistence. Shutdown unblocks waiting callers. Rejections are also reported locally because slog discards handler errors.
func (*Client) Shutdown ¶
Shutdown stops admission and waits for broker acknowledgements for accepted entries. Expiry cancels network operations and joins the publisher before returning an error. It does not wait for PostgreSQL and cannot recover entries left in memory after a timeout or process exit. Concurrent calls are safe; any caller's expired context aborts the shared drain.