Documentation
¶
Overview ¶
Package resolve pins symbolic element references to immutable descriptors. Resolution is deliberately pure: it never loads code, opens a provider, or acquires any runtime resource.
Index ¶
- Constants
- type Catalog
- func (catalog *Catalog) Exact(identity element.Identity) (element.Descriptor, bool)
- func (catalog *Catalog) Latest(name string) (element.Descriptor, bool)
- func (catalog *Catalog) Names() []string
- func (catalog *Catalog) Register(descriptor element.Descriptor) error
- func (catalog *Catalog) Revision(name string, revision uint64) (element.Descriptor, bool)
- type Entry
- type Lock
- type Mode
- type Result
Constants ¶
const LockFormatVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is an in-memory collection of immutable descriptor revisions. It is safe for concurrent readers and registrations during process startup.
func (*Catalog) Latest ¶
func (catalog *Catalog) Latest(name string) (element.Descriptor, bool)
Latest returns the highest registered revision for name.
type Entry ¶
type Entry struct {
Reference string `json:"reference" yaml:"reference"`
Identity element.Identity `json:"identity" yaml:"identity"`
}
Entry pins one symbolic reference to an immutable descriptor identity. Reference and Identity.Name differ only when a future alias or contract reference resolves to an implementation descriptor.
type Lock ¶
type Lock struct {
FormatVersion uint64 `json:"format_version" yaml:"format_version"`
Entries []Entry `json:"elements" yaml:"elements"`
}
Lock is the generated, reviewable resolution artifact consumed by normal builds. Entries are canonicalized when encoded.
func (Lock) Canonical ¶
Canonical returns a validated, independently owned lock with sorted entries.
type Mode ¶
type Mode uint8
Mode controls whether resolution consumes an existing lock or deliberately updates it. Normal compilation must use Locked.