Documentation
¶
Index ¶
- func Bool(value bool) *bool
- func Configure(config schema.Diagnostics)
- func Emit(event *Event) error
- func EmitWithConfig(config Config, event *Event) error
- func Enabled(config Config) bool
- func Int(value int) *int
- func Int64(value int64) *int64
- func NewID(prefix string) string
- func OutputEnabled(config Config) bool
- func SetConfig(config Config)
- func Uint64(value uint64) *uint64
- type Config
- type Event
- type OutputWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(config schema.Diagnostics)
Configure sets the package-level diagnostics configuration.
func EmitWithConfig ¶
EmitWithConfig appends one event to the provided diagnostics sink.
func OutputEnabled ¶
OutputEnabled reports whether process output events should be emitted.
Types ¶
type Config ¶
Config describes the active diagnostics sink configuration.
func FromSchema ¶
func FromSchema(config schema.Diagnostics) Config
FromSchema converts Atmos configuration into a diagnostics package config.
type Event ¶
type Event struct {
Type string `json:"type"`
Time time.Time `json:"time"`
ID string `json:"id,omitempty"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
CWD string `json:"cwd,omitempty"`
DryRun *bool `json:"dry_run,omitempty"`
TTY *bool `json:"tty,omitempty"`
StdinTTY *bool `json:"stdin_tty,omitempty"`
StdoutTTY *bool `json:"stdout_tty,omitempty"`
StderrTTY *bool `json:"stderr_tty,omitempty"`
RedirectStderr string `json:"redirect_stderr,omitempty"`
Started *bool `json:"started,omitempty"`
Success *bool `json:"success,omitempty"`
Canceled *bool `json:"canceled,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
DurationMS *int64 `json:"duration_ms,omitempty"`
Signaled *bool `json:"signaled,omitempty"`
Signal string `json:"signal,omitempty"`
SignalNumber *int `json:"signal_number,omitempty"`
Error string `json:"error,omitempty"`
Stream string `json:"stream,omitempty"`
Data string `json:"data,omitempty"`
Bytes *int `json:"bytes,omitempty"`
Sequence *uint64 `json:"sequence,omitempty"`
}
Event is a machine-readable diagnostics event. Events are intentionally flat JSON objects so JSONL artifacts are easy to inspect with jq and grep.
type OutputWriter ¶
type OutputWriter struct {
// contains filtered or unexported fields
}
OutputWriter emits masked process.output diagnostics events for subprocess output.
func NewOutputWriter ¶
func NewOutputWriter(config Config, id, stream string) *OutputWriter
NewOutputWriter returns a writer for opt-in subprocess output diagnostics.
Click to show internal directories.
Click to hide internal directories.