registry

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 8 Imported by: 1 module, 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

This section is empty.

Functions

func CanonicalAddressKey added in v0.12.0

func CanonicalAddressKey(address resourcev2.ResourceAddress) (string, error)

CanonicalAddressKey encodes the exact section 1 address tuple. Strings remain opaque: no splitting, Unicode normalization, case folding, or path cleaning. Equality is identity only, not authorization or permission to share cached data.

Types

type MemoryStore

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

MemoryStore keeps equal addresses isolated by route and plugin ownership. Compound struct keys preserve opaque IDs, including separators and Unicode.

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute) (*ResourceEntry, bool)

func (*MemoryStore) DeleteByConnection

func (s *MemoryStore) DeleteByConnection(pluginID, connectionID string) []ResourceEntry

func (*MemoryStore) Get

func (s *MemoryStore) Get(pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute) (*ResourceEntry, bool)

func (*MemoryStore) Put

func (s *MemoryStore) Put(entry ResourceEntry) (*ResourceEntry, bool)

func (*MemoryStore) PutIfAbsent

func (s *MemoryStore) PutIfAbsent(entry ResourceEntry) (*ResourceEntry, bool)

func (*MemoryStore) ScanByLabel

func (s *MemoryStore) ScanByLabel(pluginID, connectionID, resourceType string, selector map[string]string) []ResourceEntry

func (*MemoryStore) ScanByResourceKey

func (s *MemoryStore) ScanByResourceKey(pluginID, connectionID, resourceType string) []ResourceEntry

type ResourceEntry

type ResourceEntry struct {
	PluginID  string
	Reference resourcev2.ResourceReference
	Route     resourcev2.AccessRoute
	Labels    map[string]string
	CreatedAt time.Time
}

ResourceEntry stores provider-neutral identity and route-local projection metadata. Incarnation remains optional provider evidence, never synthesized from metadata.

func (ResourceEntry) EntryKey

func (e ResourceEntry) EntryKey() string

EntryKey returns canonical identity only. Store ownership and access route are separate projection keys and never grant permission to merge observations. Invalid addresses have no key and must not be admitted to the registry.

type Store added in v0.4.0

type Store interface {
	Put(entry ResourceEntry) (old *ResourceEntry, existed bool)
	PutIfAbsent(entry ResourceEntry) (existing *ResourceEntry, loaded bool)
	Get(pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute) (*ResourceEntry, bool)
	Delete(pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute) (*ResourceEntry, bool)
	DeleteByConnection(pluginID, connectionID string) []ResourceEntry
	ScanByLabel(pluginID, connectionID, resourceType string, selector map[string]string) []ResourceEntry
	ScanByResourceKey(pluginID, connectionID, resourceType string) []ResourceEntry
}

Store isolates observations by plugin ownership and access route, while using exact canonical address identity within each projection.

Jump to

Keyboard shortcuts

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