session

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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