resourceid

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package resourceid canonicalizes stable resource identity tokens shared by lifecycle-aware framework integrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

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

Identity is a comparable canonical resource key.

func Of

func Of(value any) (identity Identity, err error)

Of returns the stable identity of value. Values implementing Provider supply an explicit token; other values identify as themselves.

func (Identity) Valid

func (identity Identity) Valid() bool

Valid reports whether identity was produced by Of.

type Provider

type Provider interface {
	ResourceIdentity() any
}

Provider lets a semantic wrapper identify the physical resource whose lifecycle it represents. The returned token must be non-nil, comparable, reflexively equal, and stable for the resource lifetime; a pointer is the usual token.

Jump to

Keyboard shortcuts

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