Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Ts time.Time `json:"ts"`
SidecarID string `json:"sidecar_id,omitempty"`
SidecarName string `json:"sidecar_name,omitempty"`
Branch string `json:"branch,omitempty"`
Op Op `json:"op"`
Level string `json:"level"` // "step", "info", "warn", "done", "error"
Msg string `json:"msg"`
// Final marks the one event that closes an operation, with Passed and Total
// carrying its tally. A reader tells a finished operation from one still in
// flight by this, never by reading Msg.
Final bool `json:"final,omitempty"`
Passed int `json:"passed,omitempty"`
Total int `json:"total,omitempty"`
}
Event is a single status event written to the log.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log appends events to a JSONL file in a project data directory.
type Recorder ¶ added in v0.7.169
type Recorder struct {
// contains filtered or unexported fields
}
Recorder reports status through inner and records it in the log, tagging every event with the operation it belongs to. Status records an ordinary event; Final records the one that closes the operation.
func Record ¶ added in v0.7.169
func Record(dataDir string, fn iostream.StatusFunc, op Op, sidecarID, sidecarName, branch string) *Recorder
Record returns a Recorder writing to the log in dataDir. Errors opening the log are silently ignored (best-effort; never blocks) and the Recorder then only reports through fn.
Click to show internal directories.
Click to hide internal directories.