eventlog

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package eventlog contains an AX event log.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLog

type EventLog interface {
	// Append adds a conversation event to the end of the log.
	Append(ctx context.Context, event *proto.ConversationEvent) (int32, error)

	// Events returns all events for the conversation.
	Events(ctx context.Context, conversationID string) ([]*proto.ConversationEvent, error)

	// DeleteAll deletes all events for a specific conversation ID.
	DeleteAll(ctx context.Context, conversationID string) error

	// Close releases the underlying resources and closes the log.
	Close() error
}

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.

func OpenPostgresEventLog

func OpenPostgresEventLog(dsn string) (EventLog, error)

OpenPostgresEventLog connects to the PostgreSQL database described by dsn and initializes the event log schema. Caller is responsible to ensure it is safe for concurrent use.

func OpenSQLiteEventLog

func OpenSQLiteEventLog(path string) (EventLog, error)

OpenSQLiteEventLog opens (or creates) a SQLite database at path and initializes the event log schema.

type EventLogBuilder

type EventLogBuilder func() (EventLog, error)

EventLogBuilder builds new event logs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL