semanticruntime

package
v0.8.16 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrManagerClosed           = errors.New("semantic runtime manager is shut down")
	ErrLeaseClosed             = errors.New("semantic runtime lease is closed")
	ErrRootRetired             = errors.New("semantic runtime root was retired")
	ErrRetainLoadGuardRequired = errors.New("semantic runtime cold load requires a retained generation guard")
)

Functions

This section is empty.

Types

type Lease

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

Lease is one reference to an immutable cached root.

func (*Lease) Close

func (l *Lease) Close() error

func (*Lease) Search

type LoadWaitTimeoutError

type LoadWaitTimeoutError struct {
	Duration time.Duration
}

LoadWaitTimeoutError reports that a caller stopped waiting for a shared load. The manager-owned load may still finish and populate the warm cache.

func (*LoadWaitTimeoutError) Error

func (e *LoadWaitTimeoutError) Error() string

func (*LoadWaitTimeoutError) Timeout

func (e *LoadWaitTimeoutError) Timeout() bool

type LoadedSearcher

type LoadedSearcher struct {
	Searcher semanticindex.Searcher
	Close    func() error
}

LoadedSearcher couples a searcher to the callback that releases its native resources.

type Loader

type Loader func(context.Context, RootKey) (LoadedSearcher, error)

type Manager

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

Manager owns process-local immutable roots for one runtime/store lifetime.

func New

func New(loader Loader, loadWaitTimeout time.Duration) *Manager

func (*Manager) Acquire

func (m *Manager) Acquire(ctx context.Context, key RootKey, retain RetainLoadGuard) (*Lease, error)

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Shutdown

func (m *Manager) Shutdown(ctx context.Context) error

type RetainLoadGuard

type RetainLoadGuard func() (release func() error, err error)

RetainLoadGuard retains the caller's already-acquired shared-generation guard for a detached cold load.

type RootKey

type RootKey struct {
	CacheDir         string
	DatabaseID       string
	ProfileID        string
	GenerationID     string
	SnapshotRevision int64
	PurgeEpoch       int64
	BackendVersion   string
	DescriptorSHA256 string
}

RootKey is the complete identity of one validated immutable semantic root.

Jump to

Keyboard shortcuts

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