Versions in this module Expand all Collapse all v0 v0.2.0 Mar 8, 2026 Changes in this version + type Actor struct + ID uuid.UUID + Identifier string + Type string + type Context struct + ClientIP string + SessionID string + TenantID *uuid.UUID + UserAgent string + type Emitter interface + Emit func(ctx context.Context, event *Event) error + type Event struct + Action string + Actor Actor + Context Context + Details map[string]any + EventType string + ID uuid.UUID + Outcome string + Resource Resource + Sequence int64 + Timestamp time.Time + type MemoryStore struct + func NewMemoryStore(maxEvents int) *MemoryStore + func (s *MemoryStore) Acknowledge(ctx context.Context, sequence int64) error + func (s *MemoryStore) GetByActor(ctx context.Context, actorID uuid.UUID, limit int) ([]*Event, error) + func (s *MemoryStore) GetByResource(ctx context.Context, resourceType string, resourceID uuid.UUID, limit int) ([]*Event, error) + func (s *MemoryStore) GetBySequence(ctx context.Context, fromSequence int64, limit int) ([]*Event, error) + func (s *MemoryStore) GetByTimeRange(ctx context.Context, from, to time.Time, limit int) ([]*Event, error) + func (s *MemoryStore) GetLastAcknowledged(ctx context.Context) (int64, error) + func (s *MemoryStore) GetLastSequence(ctx context.Context) (int64, error) + func (s *MemoryStore) Record(ctx context.Context, event *Event) (int64, error) + type Resource struct + ID uuid.UUID + Identifier string + Type string + type Store interface + Acknowledge func(ctx context.Context, sequence int64) error + GetByActor func(ctx context.Context, actorID uuid.UUID, limit int) ([]*Event, error) + GetByResource func(ctx context.Context, resourceType string, resourceID uuid.UUID, limit int) ([]*Event, error) + GetBySequence func(ctx context.Context, fromSequence int64, limit int) ([]*Event, error) + GetByTimeRange func(ctx context.Context, from, to time.Time, limit int) ([]*Event, error) + GetLastAcknowledged func(ctx context.Context) (int64, error) + GetLastSequence func(ctx context.Context) (int64, error) + Record func(ctx context.Context, event *Event) (int64, error) + type StreamConfig struct + BatchSize int + BearerToken string + Enabled bool + Endpoint string + FlushIntervalMs int