Documentation
¶
Index ¶
- func CanonicalAddressKey(address resourcev2.ResourceAddress) (string, error)
- type MemoryStore
- func (s *MemoryStore) Delete(pluginID string, reference resourcev2.ResourceReference, ...) (*ResourceEntry, bool)
- func (s *MemoryStore) DeleteByConnection(pluginID, connectionID string) []ResourceEntry
- func (s *MemoryStore) Get(pluginID string, reference resourcev2.ResourceReference, ...) (*ResourceEntry, bool)
- func (s *MemoryStore) Put(entry ResourceEntry) (*ResourceEntry, bool)
- func (s *MemoryStore) PutIfAbsent(entry ResourceEntry) (*ResourceEntry, bool)
- func (s *MemoryStore) ScanByLabel(pluginID, connectionID, resourceType string, selector map[string]string) []ResourceEntry
- func (s *MemoryStore) ScanByResourceKey(pluginID, connectionID, resourceType string) []ResourceEntry
- type ResourceEntry
- type Store
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.