snapshotsource

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StaticRatingFromCatalog

func StaticRatingFromCatalog(id, catalogVersion, currency string, fetchedAt time.Time) economics.Snapshot[economics.RatingCatalogView]

StaticRatingFromCatalog builds a ready static rating snapshot from catalog metadata.

Types

type MemoryRatingSource

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

MemoryRatingSource is an injectable RatingSnapshotSource.

func NewMemoryRatingSource

func NewMemoryRatingSource(snap economics.Snapshot[economics.RatingCatalogView]) *MemoryRatingSource

NewMemoryRatingSource returns a rating source seeded with snap.

func (*MemoryRatingSource) Publish

Publish replaces the active rating snapshot.

func (*MemoryRatingSource) Snapshot

Snapshot implements economics.RatingSnapshotSource.

type MemoryRuleSource

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

MemoryRuleSource is an injectable publishable RuleSnapshotSource for tests and enterprise refresh adapters (requirements 11.5, 11.6).

func NewMemoryRuleSource

func NewMemoryRuleSource(snap economics.Snapshot[economics.PolicyRulesView]) *MemoryRuleSource

NewMemoryRuleSource returns a source seeded with snap (deep-copied on read).

func (*MemoryRuleSource) Publish

Publish replaces the active snapshot atomically for subsequent Snapshot calls. Prior returned snapshots remain unchanged (immutable value copies).

func (*MemoryRuleSource) Snapshot

Snapshot implements economics.RuleSnapshotSource.

Jump to

Keyboard shortcuts

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