continuity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package continuity provides the core-owned B2BUA and lineage boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryStoreFromConfig

func NewMemoryStoreFromConfig(cfg config.ContinuityConfig) (b2bua.Store, error)

NewMemoryStoreFromConfig creates an in-memory b2bua.Store from the memory-related fields of a ContinuityConfig. It validates InMemory, TTL, and MaxLegs. This is a pure-core helper with no infra/db dependency.

func ResolveALegRecord

func ResolveALegRecord(ctx context.Context, store b2bua.Store, ref lipapi.SessionRef) (b2bua.ALegRecord, error)

ResolveALegRecord resolves ref to a stored A-leg row (ALegID, WeightedFirstConsumed, etc.). Session resolution order matches Manager.ResolveSession: ALegID, then ContinuityKey, then new A-leg.

func SDKStore

func SDKStore(inner b2bua.Store) lipsdkc.Store

SDKStore wraps a b2bua.Store as a pkg/lipsdk/continuity.Store for stable API boundaries.

Types

type Manager

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

Manager provides the core-owned B2BUA and lineage boundary. It wraps b2bua.Store with higher-level session resolution semantics.

func NewManager

func NewManager(store b2bua.Store) (*Manager, error)

NewManager creates a Manager backed by store.

func (*Manager) ResolveSession

func (m *Manager) ResolveSession(ctx context.Context, ref lipapi.SessionRef) (Session, error)

ResolveSession returns the existing session for ref, or creates a new one. It follows the same resolution order as the executor: ALegID > ContinuityKey > new.

func (*Manager) Store

func (m *Manager) Store() b2bua.Store

Store returns the underlying b2bua.Store for direct access by the executor.

type Session

type Session struct {
	ALegID        string
	ContinuityKey string
	CreatedAt     time.Time
	IsNew         bool
}

Session represents a resolved or created A-leg continuity session.

Directories

Path Synopsis
Package bunstore implements b2bua.Store using Bun over database/sql for managed durable continuity (PostgreSQL) and for dialect-backed tests (SQLite).
Package bunstore implements b2bua.Store using Bun over database/sql for managed durable continuity (PostgreSQL) and for dialect-backed tests (SQLite).

Jump to

Keyboard shortcuts

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