resourceid

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 2 Imported by: 0 modules, 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

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