Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultForTesting ¶
func SetDefaultForTesting(sink Sink) func()
func ValidateDefaultConfig ¶
func ValidateDefaultConfig() error
Types ¶
type ReadSurfaceGate ¶
type ReadSurfaceGate struct {
// contains filtered or unexported fields
}
ReadSurfaceGate bounds telemetry volume for high-frequency read-only commands (axi-status, axi-home, status, runs). It emits when the observed state fingerprint changed since the last emit, and otherwise at most once per heartbeat interval. State persists in a small JSON file so agent polling loops - a fresh CLI process per poll - stay bounded across process boundaries. Any state-file failure fails open (emit), degrading to the pre-gate behavior instead of dropping meaningful events.
func NewReadSurfaceGate ¶
NewReadSurfaceGate creates a gate persisting state at path. now is injectable for deterministic tests; nil means time.Now.
func (*ReadSurfaceGate) ShouldEmit ¶
func (g *ReadSurfaceGate) ShouldEmit(surface, fingerprint string) bool
ShouldEmit reports whether the surface's event should be emitted now, and records the emit when it returns true. fingerprint is a low-cardinality summary of the observed state; any change emits immediately, an unchanged fingerprint emits at most once per interval.