MCPcopy
hub / github.com/google/ax / EventLog

Interface EventLog

internal/controller/executor/eventlog.go:27–45  ·  view source on GitHub ↗

EventLog is the persistent, append-only record of all actions taken in an exec. Every entry is an atomic step: replaying the log in order brings the executor back to a consistent state from which execution can resume.

Source from the content-addressed store, hash-verified

25// exec. Every entry is an atomic step: replaying the log in order brings
26// the executor back to a consistent state from which execution can resume.
27type EventLog interface {
28 // Append adds a conversation event to the end of the log.
29 Append(ctx context.Context, event *proto.ConversationEvent) (int32, error)
30
31 // AppendExec adds an execution event to the end of the log.
32 AppendExec(ctx context.Context, event *proto.ExecutionEvent) error
33
34 // Events returns all events for the conversation.
35 Events(ctx context.Context, conversationID string) ([]*proto.ConversationEvent, error)
36
37 // ExecEvents returns all events for a specific execution ID.
38 ExecEvents(ctx context.Context, execID string) ([]*proto.ExecutionEvent, error)
39
40 // DeleteEvents deletes all events for a specific conversation ID.
41 DeleteEvents(ctx context.Context, conversationID string) error
42
43 // Close releases the underlying resources and closes the log.
44 Close() error
45}
46
47var marshalOpts = protojson.MarshalOptions{UseProtoNames: true}
48var unmarshalOpts = protojson.UnmarshalOptions{DiscardUnknown: true}

Callers 34

executeMethod · 0.65
ForkMethod · 0.65
logPendingFunction · 0.65
logFailedFunction · 0.65
logCompletedFunction · 0.65
logOutputsFunction · 0.65
ExecMethod · 0.65

Implementers 2

SQLiteEventLoginternal/controller/executor/sqlite.go
MemoryEventLoginternal/controller/executor/executort

Calls

no outgoing calls

Tested by

no test coverage detected