mongo

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: 5 Imported by: 0

Documentation

Overview

Package mongo provides a MongoDB-backed implementation of the agents runtime session store. Build the low-level client via features/session/mongo/clients/mongo and pass it to NewStore so higher-level services can persist run metadata outside the core runtime.

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 implements session.Store by delegating to the Mongo client.

func NewStore

func NewStore(client mongo.Client) (*Store, error)

NewStore builds a Store using the provided client.

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, sessionID string, createdAt time.Time) (session.Session, error)

CreateSession implements session.Store.

func (*Store) EndSession

func (s *Store) EndSession(ctx context.Context, sessionID string, endedAt time.Time) (session.Session, error)

EndSession implements session.Store.

func (*Store) LinkChildRun

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

LinkChildRun implements session.Store.

func (*Store) ListRunsBySession

func (s *Store) ListRunsBySession(ctx context.Context, sessionID string, statuses []session.RunStatus) ([]session.RunMeta, error)

ListRunsBySession implements session.Store.

func (*Store) LoadRun

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

LoadRun implements session.Store.

func (*Store) LoadSession

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

LoadSession implements session.Store.

func (*Store) UpsertRun

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

UpsertRun implements session.Store.

Directories

Path Synopsis
clients
mongo
Package mongo hosts the MongoDB client used by the session store.
Package mongo hosts the MongoDB client used by the session store.

Jump to

Keyboard shortcuts

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