Documentation
¶
Index ¶
- type MemoryEventLog
- func (m *MemoryEventLog) Append(_ context.Context, event *proto.ConversationEvent) (int32, error)
- func (m *MemoryEventLog) Close() error
- func (m *MemoryEventLog) DeleteAll(_ context.Context, conversationID string) error
- func (m *MemoryEventLog) Drop(drop func(*proto.ConversationEvent) bool)
- func (m *MemoryEventLog) Events(_ context.Context, conversationID string) ([]*proto.ConversationEvent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryEventLog ¶
type MemoryEventLog struct {
AllEvents []*proto.ConversationEvent
// contains filtered or unexported fields
}
MemoryEventLog is an in-memory EventLog useful for testing and short-lived executions. It does not survive process restarts.
func (*MemoryEventLog) Append ¶
func (m *MemoryEventLog) Append(_ context.Context, event *proto.ConversationEvent) (int32, error)
func (*MemoryEventLog) Close ¶
func (m *MemoryEventLog) Close() error
func (*MemoryEventLog) DeleteAll ¶
func (m *MemoryEventLog) DeleteAll(_ context.Context, conversationID string) error
func (*MemoryEventLog) Drop ¶
func (m *MemoryEventLog) Drop(drop func(*proto.ConversationEvent) bool)
Drop removes every event for which drop returns true. It is provided for testing and crash-simulation purposes.
func (*MemoryEventLog) Events ¶
func (m *MemoryEventLog) Events(_ context.Context, conversationID string) ([]*proto.ConversationEvent, error)
Click to show internal directories.
Click to hide internal directories.