registry

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package registry is the run-scoped store mapping id -> resolved Candidate, enabling follow markers to reuse producers' results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Old model.Candidate // the value currently in the file, before the run
	New model.Candidate // the value the producer resolved
}

Entry pairs a producer's value before the run with the value it resolved, so a follow marker can request either the old or the new value.

type Registry

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

Registry is the run-scoped store mapping a producer's id to its resolved entry, so follow markers can reuse a producer's result. It is safe for the concurrent producers the executor runs; the follow-edge DAG guarantees a producer's Set happens before a follower's Get.

func New

func New() *Registry

New returns an empty registry.

func (*Registry) Get

func (r *Registry) Get(id string) (Entry, bool)

Get returns the entry recorded for id, if any.

func (*Registry) Set

func (r *Registry) Set(id string, entry Entry)

Set records the entry a producer resolved under its id.

Jump to

Keyboard shortcuts

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