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.
| 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. |
| 27 | type 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 | |
| 47 | var marshalOpts = protojson.MarshalOptions{UseProtoNames: true} |
| 48 | var unmarshalOpts = protojson.UnmarshalOptions{DiscardUnknown: true} |
no outgoing calls
no test coverage detected