Documentation
¶
Overview ¶
Package trace provides the structured execution event model used by gbash.
This is a supported public extension package for callers that need to consume, record, or test against gbash execution events. Most embedders should prefer the root `github.com/ewhauser/gbash` package unless they are integrating with tracing or telemetry systems directly. Runtime tracing is opt-in; most embedders should enable redacted tracing from the root package rather than wiring raw event capture by default.
Index ¶
Constants ¶
View Source
const SchemaVersion = "gbash.trace.v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandEvent ¶
type Event ¶
type Event struct {
Schema string
SessionID string
ExecutionID string
Kind Kind
At time.Time
// Redacted reports whether gbash scrubbed sensitive argv material before
// the event was recorded or emitted.
Redacted bool
Command *CommandEvent
File *FileEvent
Policy *PolicyEvent
Message string
Error string
}
type Fanout ¶
type Fanout struct {
// contains filtered or unexported fields
}
Fanout forwards each event to multiple recorders.
type NopRecorder ¶
type NopRecorder struct{}
NopRecorder discards every event.
func (NopRecorder) Record ¶
func (NopRecorder) Record(*Event)
func (NopRecorder) Snapshot ¶
func (NopRecorder) Snapshot() []Event
type Option ¶
type Option func(*Buffer)
func WithExecutionID ¶
func WithSchema ¶
func WithSessionID ¶
type PolicyEvent ¶
Click to show internal directories.
Click to hide internal directories.