inmemory

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a thread-safe in-memory session store.

func New

func New() *Store

func (*Store) AppendEvent

func (s *Store) AppendEvent(ctx context.Context, req *session.Session, ev *session.Event) error

func (*Store) GetOrCreate

func (s *Store) GetOrCreate(ctx context.Context, req *session.Session) (*session.Session, error)

func (*Store) ListContextWindowEvents

func (s *Store) ListContextWindowEvents(ctx context.Context, req *session.Session) ([]*session.Event, error)

func (*Store) ListEvents

func (s *Store) ListEvents(ctx context.Context, req *session.Session) ([]*session.Event, error)

func (*Store) ListEventsAfter added in v0.0.23

func (s *Store) ListEventsAfter(ctx context.Context, req *session.Session, afterCursor string, limit int) ([]*session.Event, string, error)

func (*Store) ReplaceState added in v0.0.10

func (s *Store) ReplaceState(ctx context.Context, req *session.Session, values map[string]any) error

func (*Store) SessionExists added in v0.0.16

func (s *Store) SessionExists(ctx context.Context, req *session.Session) (bool, error)

func (*Store) SnapshotState

func (s *Store) SnapshotState(ctx context.Context, req *session.Session) (map[string]any, error)

func (*Store) UpdateState added in v0.0.17

func (s *Store) UpdateState(ctx context.Context, req *session.Session, update func(map[string]any) (map[string]any, error)) error

Jump to

Keyboard shortcuts

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