session

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package session provides a transient, in-memory store for coordination facts during OODA loop execution. Facts in this store are isolated by SessionID and are NOT persisted to MEB (BadgerDB).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionFact

type SessionFact struct {
	Subject   string
	Predicate string
	Object    string
	Graph     string
	CreatedAt time.Time
	TTL       time.Duration
}

func NewSessionFact

func NewSessionFact(subject, predicate, object, graph string, ttl time.Duration) *SessionFact

func (*SessionFact) IsExpired

func (f *SessionFact) IsExpired() bool

type SessionStore

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

func NewSessionStore

func NewSessionStore() *SessionStore

func (*SessionStore) CleanupExpired

func (s *SessionStore) CleanupExpired() int

func (*SessionStore) ClearSession

func (s *SessionStore) ClearSession(ctx context.Context, sessionID string) error

func (*SessionStore) Count

func (s *SessionStore) Count(ctx context.Context) int

func (*SessionStore) Delete

func (s *SessionStore) Delete(ctx context.Context, sessionID, key string) error

func (*SessionStore) Get

func (s *SessionStore) Get(ctx context.Context, sessionID, key string) (*SessionFact, error)

func (*SessionStore) GetAll

func (s *SessionStore) GetAll(ctx context.Context, sessionID string) ([]*SessionFact, error)

func (*SessionStore) ListSessions

func (s *SessionStore) ListSessions(ctx context.Context) ([]string, error)

func (*SessionStore) Put

func (s *SessionStore) Put(ctx context.Context, sessionID, key string, fact *SessionFact) error

func (*SessionStore) SetTTL

func (s *SessionStore) SetTTL(ttl time.Duration)

func (*SessionStore) ToAtoms

func (s *SessionStore) ToAtoms(ctx context.Context, sessionID string) ([]core.Atom, error)

func (*SessionStore) ToQuads

func (s *SessionStore) ToQuads(ctx context.Context, sessionID string) ([]core.Quad, error)

type TransientFactsStore

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

func NewTransientFactsStore

func NewTransientFactsStore() *TransientFactsStore

func (*TransientFactsStore) ClearSession

func (t *TransientFactsStore) ClearSession(ctx context.Context, sessionID string) error

func (*TransientFactsStore) Delete

func (t *TransientFactsStore) Delete(ctx context.Context, sessionID, key string) error

func (*TransientFactsStore) Get

func (t *TransientFactsStore) Get(ctx context.Context, sessionID, key string) (*ports.TransientFact, error)

func (*TransientFactsStore) GetAll

func (t *TransientFactsStore) GetAll(ctx context.Context, sessionID string) ([]*ports.TransientFact, error)

func (*TransientFactsStore) Put

func (t *TransientFactsStore) Put(ctx context.Context, sessionID, key string, fact *ports.TransientFact) error

func (*TransientFactsStore) ToAtoms

func (t *TransientFactsStore) ToAtoms(ctx context.Context, sessionID string) ([]core.Atom, error)

func (*TransientFactsStore) ToQuads

func (t *TransientFactsStore) ToQuads(ctx context.Context, sessionID string) ([]core.Quad, error)

Jump to

Keyboard shortcuts

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