catalog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package catalog is the settings catalog of each supported Temporal minor, embedded in the binary: every dynamic-config key with its type, default, roles and apply hint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Minors

func Minors() []string

Minors are the Temporal minors with an embedded catalog, oldest first.

Types

type Catalog

type Catalog struct {
	Temporal      string    `json:"temporal"`
	GeneratedFrom string    `json:"generatedFrom"`
	Settings      []Setting `json:"settings"`
	// contains filtered or unexported fields
}

Catalog is one catalog-<minor>.json, written by tools/cataloggen.

func Load

func Load(minor string) (*Catalog, error)

Load reads the catalog of minor, such as 1.31, and its classes.

func (*Catalog) Class

func (c *Catalog) Class(key string) Class

Class is the class of the setting named key, or unknown.

func (*Catalog) Closest

func (c *Catalog) Closest(key string) []string

Closest are up to three known keys for a key that is not one: those it is a prefix of, else those at the smallest edit distance.

func (*Catalog) Lookup

func (c *Catalog) Lookup(key string) (Setting, bool)

Lookup is the setting named key; Temporal matches keys case-insensitively.

func (*Catalog) Search

func (c *Catalog) Search(text string) []Setting

Search is every setting whose key contains text, then every other one whose description does, ignoring case; an empty text matches all.

type Class

type Class struct {
	Apply    string `yaml:"apply" json:"apply"`
	Evidence string `yaml:"evidence" json:"evidence,omitempty"`
	Lab      string `yaml:"lab" json:"lab,omitempty"`
}

Class is how a change to a key reaches a running server, with the evidence for it (backend schema class-<minor>.yaml).

type Setting

type Setting struct {
	Key         string   `json:"key"`
	Type        string   `json:"type"`
	Precedence  string   `json:"precedence"`
	Constraints []string `json:"constraints"`
	Default     any      `json:"default"`
	DefaultExpr string   `json:"defaultExpr"`
	Description string   `json:"description"`
	Roles       []string `json:"roles"`
	Candidate   string   `json:"candidate"`
}

Setting is one dynamic-config key (backend schema "Settings catalog").

Jump to

Keyboard shortcuts

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