Documentation
¶
Overview ¶
Package outbox is the agent's per-node buffer for logs and events destined for remote sinks (RuneSight, CloudWatch, Datadog).
The outbox is intentionally simple in RUNE-032: a bounded in-memory channel with a drop-oldest policy on overflow. Persistence and pluggable sinks land with the observability work in Release 4. The abstraction exists now so subsystems built in the next networking tickets (data plane, DNS, policy) write to a stable interface that will not change when the real outbox lands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Kind Kind
Timestamp time.Time
Source string // subsystem name
Message string // for KindLog; short summary for KindEvent
Fields map[string]interface{} // structured fields
}
Entry is a single buffered item.
type Outbox ¶
type Outbox struct {
// contains filtered or unexported fields
}
Outbox is a bounded, thread-safe FIFO of Entries. Producers call Push; consumers (sink writers) call Drain in batches.
func (*Outbox) Close ¶
func (o *Outbox) Close()
Close marks the outbox as closed. Subsequent Pushes are dropped silently. Drain still returns any entries already buffered.
func (*Outbox) Drain ¶
Drain removes up to max entries (oldest first) and returns them. If the outbox is empty, Drain returns nil. max <= 0 drains everything.