Versions in this module Expand all Collapse all v0 v0.0.7 Oct 27, 2026 v0.0.6 Oct 16, 2026 Changes in this version + const ReasonBroken + const ReasonPruned + const ReasonRewritten + const ReasonTruncated + const SourceControlPlane + const SourceProject + var ErrHoldUnreadable = errors.New("auditforward: the audit forwarding cursors could not be read") + var ErrMetadataAddress = errors.New("auditforward: refusing to connect to a cloud metadata service") + var ErrPlaintextOffHost = errors.New("auditforward: refusing plaintext to a non-loopback address") + func IsSinkRepair(r config.LoadRepair) bool + func RetentionHold(db *statedb.DB, dbPath, controlPlane string) (hold statedb.AuditForwardHold, held bool, consulted []string, err error) + func Unhealthy(r Report, maxLag time.Duration, now time.Time) string + type Chain struct + Dir string + Path string + Source string + type ChainReport struct + Backlog int64 + Cursor statedb.AuditForwardCursor + Err error + HeadID int64 + PendingSince time.Time + type ChainStatus struct + AckedID int64 + Chain Chain + HeadID int64 + PendingSince time.Time + type ChainVerdict struct + BadHashes []int64 + BrokenLinks []int64 + Dir string + Duplicates int + FirstID int64 + Forks []int64 + Gaps []IDRange + Hubs []string + LastID int64 + Rows int + Source string + Unverified []int64 + func (v ChainVerdict) OK() bool + type Credentials func(ref string) ([]byte, error) + type Forwarder struct + func New(opts Options) (*Forwarder, error) + func (f *Forwarder) Run(ctx context.Context) + func (f *Forwarder) Snapshot() []SinkStatus + type Hooks struct + AfterAck func(sink string, chain Chain, firstID, lastID int64) + type IDRange struct + From int64 + To int64 + type Options struct + Chains func() []Chain + Config func() (config.AuditForwardConfig, error) + ConfigPoll time.Duration + ConfigSource string + ControlPlane string + Credentials Credentials + Hooks Hooks + Logf func(format string, args ...any) + Now func() time.Time + Poll time.Duration + Refused func() []string + Version string + type Report struct + Chains []ChainReport + Sink config.AuditForwardSink + func Status(cpPath string, cfg config.AuditForwardConfig) ([]Report, error) + func (r Report) Backlog() int64 + func (r Report) Delivered() int64 + func (r Report) Lag(now time.Time) time.Duration + func (r Report) LastDelivery() time.Time + func (r Report) LastError() (string, time.Time) + type SinkDescription struct + CAFile string + ClientCert string + Endpoint string + Fingerprint string + Format string + Name string + PlaintextLoopback bool + Refs []string + ServerName string + Start string + Type string + Variant string + func Describe(s config.AuditForwardSink) SinkDescription + type SinkStatus struct + Chains map[string]ChainStatus + Endpoint string + LastDeliveredAt time.Time + LastError string + LastErrorAt time.Time + Name string + Type string + func (s SinkStatus) Backlog() int64 + func (s SinkStatus) Lag(now time.Time) time.Duration + type StreamReport struct + Chains []ChainVerdict + Lines int + Malformed []int + Skipped int + func VerifyStream(r io.Reader) (StreamReport, error) + func (r StreamReport) OK() bool