Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionHTTPRequest = "http.request" ActionHTTPResponse = "http.response" ActionHTTPError = "http.error" )
View Source
const ActionUIRender = "ui.render"
ActionUIRender is for an event that indicates we wrote output to the UI
View Source
const RecorderKey contextKey = "journal-recorder"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
Timestamp time.Time `json:"timestamp"`
Action string `json:"action"`
Payload any `json:"payload,omitempty"`
}
func ParseEvents ¶
ParseEvents will read the events from the reader
func ParseEventsFromFile ¶
ParseEventsFromFile will read the events from the given file path
type FileRecorder ¶
type FileRecorder struct {
// contains filtered or unexported fields
}
FileRecorder writes a structured log of the agent's actions and observations to a file.
func NewFileRecorder ¶
func NewFileRecorder(path string) (*FileRecorder, error)
NewFileRecorder creates a new FileRecorder that writes to the given file.
type LogRecorder ¶
type LogRecorder struct {
}
func (*LogRecorder) Close ¶
func (r *LogRecorder) Close() error
Source Files
¶
- context.go
- loader.go
- log.go
- recorder.go
Click to show internal directories.
Click to hide internal directories.