Documentation
¶
Index ¶
- func ArtifactNames(artifacts []Artifact) []string
- func DecodePayload(payloadType string, payloadBlob []byte, payloadJSON string) ([]byte, error)
- func LatestArtifactText(artifacts []Artifact, name string) string
- func ResolvePath(commandPath, requested string, now time.Time) (string, error)
- type Artifact
- type CaptureSummary
- type Cause
- type ChangeSummary
- type CommandSuggestion
- type Entities
- type EventMeta
- type FailureHint
- type PolicySummary
- type Recorder
- func (r *Recorder) Close() error
- func (r *Recorder) HandleDeployEvent(evt deploy.StreamEvent)
- func (r *Recorder) ObserveLog(rec tailer.LogRecord)
- func (r *Recorder) ObserveSelection(sel tailer.SelectionSnapshot)
- func (r *Recorder) RecordArtifact(ctx context.Context, name, text string) error
- func (r *Recorder) RecordDeployEvent(ctx context.Context, evt deploy.StreamEvent) error
- func (r *Recorder) RecordEvent(ctx context.Context, meta EventMeta, payload any) error
- func (r *Recorder) RecordLog(ctx context.Context, rec tailer.LogRecord) error
- func (r *Recorder) RecordSelection(ctx context.Context, sel tailer.SelectionSnapshot) error
- func (r *Recorder) RunID() string
- func (r *Recorder) SessionID() string
- type ResourceHint
- type SessionMeta
- type SessionSummary
- type SummaryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArtifactNames ¶
func DecodePayload ¶
DecodePayload returns the decoded payload bytes for a captured event row. It supports the current `json+gzip` encoding and falls back to the stored JSON text.
func LatestArtifactText ¶
Types ¶
type CaptureSummary ¶
type CaptureSummary struct {
Path string `json:"path"`
GeneratedAt time.Time `json:"generatedAt"`
Sessions []SessionSummary `json:"sessions"`
}
func Summarize ¶
func Summarize(ctx context.Context, path string, opts SummaryOptions) (*CaptureSummary, error)
Summarize reads a capture SQLite database and returns a compact explanation-oriented summary.
type ChangeSummary ¶
type CommandSuggestion ¶
type FailureHint ¶
type FailureHint struct {
Seq int64 `json:"seq,omitempty"`
TS time.Time `json:"ts,omitempty"`
Kind string `json:"kind,omitempty"`
Level string `json:"level,omitempty"`
Source string `json:"source,omitempty"`
Namespace string `json:"namespace,omitempty"`
Pod string `json:"pod,omitempty"`
Container string `json:"container,omitempty"`
Message string `json:"message,omitempty"`
}
type PolicySummary ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func (*Recorder) HandleDeployEvent ¶
func (r *Recorder) HandleDeployEvent(evt deploy.StreamEvent)
func (*Recorder) ObserveLog ¶
func (*Recorder) ObserveSelection ¶
func (r *Recorder) ObserveSelection(sel tailer.SelectionSnapshot)
func (*Recorder) RecordArtifact ¶
func (*Recorder) RecordDeployEvent ¶
func (*Recorder) RecordEvent ¶
func (*Recorder) RecordSelection ¶
type ResourceHint ¶
type SessionMeta ¶
type SessionMeta struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
RunID string `json:"runId,omitempty"`
ParentRunID string `json:"parentRunId,omitempty"`
StartedAt time.Time `json:"startedAt"`
Host string `json:"host,omitempty"`
User string `json:"user,omitempty"`
Extra map[string]string `json:"extra,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
Entities Entities `json:"entities,omitempty"`
}
type SessionSummary ¶
type SessionSummary struct {
SessionID string `json:"sessionId"`
RunID string `json:"runId,omitempty"`
ParentRunID string `json:"parentRunId,omitempty"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
StartedAt time.Time `json:"startedAt"`
EndedAt *time.Time `json:"endedAt,omitempty"`
Duration string `json:"duration,omitempty"`
Outcome string `json:"outcome"`
Host string `json:"host,omitempty"`
User string `json:"user,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
Extra map[string]string `json:"extra,omitempty"`
Entities Entities `json:"entities,omitempty"`
DroppedEvents int64 `json:"droppedEvents,omitempty"`
EventCount int `json:"eventCount"`
ArtifactCount int `json:"artifactCount"`
EventKinds map[string]int `json:"eventKinds,omitempty"`
EventSources map[string]int `json:"eventSources,omitempty"`
ChangeSummary ChangeSummary `json:"changeSummary,omitempty"`
PrimaryCause *Cause `json:"primaryCause,omitempty"`
Causes []Cause `json:"causes,omitempty"`
FailureHints []FailureHint `json:"failureHints,omitempty"`
ResourceHints []ResourceHint `json:"resourceHints,omitempty"`
ArtifactNames []string `json:"artifactNames,omitempty"`
BuildDigest string `json:"buildDigest,omitempty"`
BuildTags []string `json:"buildTags,omitempty"`
BuildPolicy *PolicySummary `json:"buildPolicy,omitempty"`
ApplyStatus string `json:"applyStatus,omitempty"`
StackNodeCount int `json:"stackNodeCount,omitempty"`
ReviewCommand string `json:"reviewCommand,omitempty"`
RollbackCommand string `json:"rollbackCommand,omitempty"`
LogsCommand string `json:"logsCommand,omitempty"`
FixCommands []CommandSuggestion `json:"fixCommands,omitempty"`
Suggestions []string `json:"suggestions,omitempty"`
}
type SummaryOptions ¶
Click to show internal directories.
Click to hide internal directories.