Documentation
¶
Overview ¶
Package inmem provides an in-memory implementation of session.Store.
It is intended for tests and local development. Production deployments should use a durable implementation (for example features/session/mongo).
Index ¶
- type Store
- func (s *Store) CreateSession(_ context.Context, sessionID string, createdAt time.Time) (session.Session, error)
- func (s *Store) EndSession(_ context.Context, sessionID string, endedAt time.Time) (session.Session, error)
- func (s *Store) LinkChildRun(_ context.Context, parentRunID string, child session.RunMeta) error
- func (s *Store) ListRunsBySession(_ context.Context, sessionID string, statuses []session.RunStatus) ([]session.RunMeta, error)
- func (s *Store) LoadRun(_ context.Context, runID string) (session.RunMeta, error)
- func (s *Store) LoadSession(_ context.Context, sessionID string) (session.Session, error)
- func (s *Store) UpsertRun(_ context.Context, run session.RunMeta) error
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 an in-memory implementation of session.Store. It is safe for concurrent use.
func (*Store) CreateSession ¶
func (s *Store) CreateSession(_ context.Context, sessionID string, createdAt time.Time) (session.Session, error)
CreateSession implements session.Store.
func (*Store) EndSession ¶
func (s *Store) EndSession(_ context.Context, sessionID string, endedAt time.Time) (session.Session, error)
EndSession implements session.Store.
func (*Store) LinkChildRun ¶
LinkChildRun implements session.Store.
func (*Store) ListRunsBySession ¶
func (s *Store) ListRunsBySession(_ context.Context, sessionID string, statuses []session.RunStatus) ([]session.RunMeta, error)
ListRunsBySession implements session.Store.
func (*Store) LoadSession ¶
LoadSession implements session.Store.
Click to show internal directories.
Click to hide internal directories.