inmem

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 6 Imported by: 0

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

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 New

func New() *Store

New returns an empty Store.

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

func (s *Store) LinkChildRun(_ context.Context, parentRunID string, child session.RunMeta) error

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) LoadRun

func (s *Store) LoadRun(_ context.Context, runID string) (session.RunMeta, error)

LoadRun implements session.Store.

func (*Store) LoadSession

func (s *Store) LoadSession(_ context.Context, sessionID string) (session.Session, error)

LoadSession implements session.Store.

func (*Store) UpsertRun

func (s *Store) UpsertRun(_ context.Context, run session.RunMeta) error

UpsertRun implements session.Store.

Jump to

Keyboard shortcuts

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