memory

package
v0.3.3 Latest Latest
Warning

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

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

Documentation

Overview

Package memory provides the immutable static datasource reference provider.

Construction validates and detaches one complete profile, policy, and handle dataset before publication. Exact lookups are lock-free, deterministic, and return self-contained values from the single published generation. The provider has no reload, fallback, clock, network, signer, or replay behavior.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider resolves exact records from one immutable in-memory snapshot.

func New

func New(
	generation uint64,
	handles []datasource.KeyHandleID,
	profiles []datasource.Profile,
	policies []datasource.Policy,
	limits datasource.Limits,
) (*Provider, error)

New transactionally validates and owns one immutable static snapshot.

func (*Provider) Equivalent

func (p *Provider) Equivalent(other *Provider) bool

Equivalent reports whether two valid immutable providers contain the exact same generation, limits, accounting, handles, profiles, and policies.

func (*Provider) Format

func (p *Provider) Format(state fmt.State, _ rune)

Format prevents formatting verbs from exposing snapshot facts.

func (*Provider) GoString

func (p *Provider) GoString() string

GoString returns a constant protected provider representation.

func (*Provider) InspectPolicy

func (p *Provider) InspectPolicy(
	ctx context.Context,
	request datasource.PolicyRequest,
) (datasource.ResolvedPolicy, error)

InspectPolicy validates an exact same-generation policy and every profile relationship without requiring active status or a current validity window. Its result is an inert datasource record, never a signing authorization.

func (*Provider) MarshalJSON

func (p *Provider) MarshalJSON() ([]byte, error)

MarshalJSON emits an empty object so future fields cannot expose snapshot facts.

func (*Provider) ResolvePolicy

func (p *Provider) ResolvePolicy(
	ctx context.Context,
	request datasource.PolicyRequest,
) (datasource.ResolvedPolicy, error)

ResolvePolicy resolves one exact active policy with its same-generation profile.

func (*Provider) ResolveProfile

func (p *Provider) ResolveProfile(
	ctx context.Context,
	request datasource.ProfileRequest,
) (datasource.ResolvedProfile, error)

ResolveProfile resolves one exact active profile from the immutable snapshot.

func (*Provider) String

func (p *Provider) String() string

String returns a constant protected provider summary.

func (*Provider) Usage

func (p *Provider) Usage() (datasource.Usage, error)

Usage returns immutable bounded snapshot accounting.

func (*Provider) Valid

func (p *Provider) Valid() bool

Valid reports whether the provider owns one complete immutable snapshot.

Jump to

Keyboard shortcuts

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