Documentation
¶
Index ¶
- Constants
- Variables
- type Clock
- type Config
- type Dependencies
- type EnsureDirectory
- type NewTicker
- type OpenFile
- type Recorder
- func (recorder *Recorder) Close() Status
- func (recorder *Recorder) Health() <-chan clievent.TraceIncomplete
- func (recorder *Recorder) Path() string
- func (recorder *Recorder) Record(event clievent.Event) (accepted bool)
- func (recorder *Recorder) ReportRejectionEvidenceLoss(count uint64) bool
- func (recorder *Recorder) ReportUpstreamLoss(loss clievent.TraceLoss) bool
- func (recorder *Recorder) RunID() string
- func (recorder *Recorder) Status() Status
- type RunTraceRecord
- type Status
- type Target
- type Ticker
- type TraceFile
Constants ¶
const ( SchemaVersion = 5 DefaultLifecycleCapacity = 256 DefaultSampleInterval = 250 * time.Millisecond )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type EnsureDirectory ¶
type OpenFile ¶
OpenFile is an exclusive-create seam: collisions must remain distinguishable so directory targets can choose a new identity without inspecting existing evidence.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func OpenWithDependencies ¶
func (*Recorder) Health ¶
func (recorder *Recorder) Health() <-chan clievent.TraceIncomplete
Health exposes a capacity-one edge notification. The final Close status is authoritative because later failures and final drop totals may follow this signal.
func (*Recorder) Path ¶
Path is intentionally local recorder state; trace rows omit it so a diagnostic artifact cannot disclose the caller's filesystem namespace.
func (*Recorder) Record ¶
Record never performs file IO and never waits for queue capacity. A false result means the event was rejected or could not be retained.
func (*Recorder) ReportRejectionEvidenceLoss ¶
This numeric path cannot recurse through the rejected observation contract.
func (*Recorder) ReportUpstreamLoss ¶
ReportUpstreamLoss preserves loss that happened before an event reached the recorder. Progress sampling loss alone is expected and does not make a trace incomplete.
type RunTraceRecord ¶
type RunTraceRecord struct {
SourceTime string `json:"source_time,omitempty"`
Scope *diagnostics.Scope `json:"scope,omitempty"`
SchemaVersion int `json:"schema_version"`
Sequence string `json:"sequence"`
Time string `json:"time"`
ElapsedMS string `json:"elapsed_ms"`
Level string `json:"level"`
Event string `json:"event"`
Command string `json:"command"`
RuntimeRunID string `json:"runtime_run_id"`
Correlation any `json:"correlation,omitempty"`
Payload any `json:"payload"`
}
RunTraceRecord combines product events and source-owned diagnostics for export. Scope distinguishes diagnostic records; their names and payloads are open. The trace envelope version is independent of the typed product wire contract.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target keeps the no-clobber policy coupled to the namespace the user chose. Its fields stay private so callers cannot create an ambiguous file-or-directory target.
func ExactFile ¶
ExactFile treats the caller's path as a one-attempt ownership claim so a collision cannot alter the prior run's evidence.
func RunDirectory ¶
RunDirectory preserves prior evidence by assigning each invocation a fresh, internally generated sibling rather than applying overwrite or rotation policy.