connledger

package
v1.166.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package connledger records the configuration each of a toolkit's run-time connections was added with, so a reconcile can tell an announcement of the configuration a replica already serves from a change (#2704).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ledger

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

Ledger records the configuration each of a toolkit's run-time connections was added with, as a digest of its canonical JSON: the toolkit records after a successful add and forgets on removal, and answers toolkit.ConfigHolder from it. A toolkit that fills secret references when it adds a connection records and asks with the filled configuration, so a rotated secret is a changed configuration. The digest is all that is kept, so no secret value is held here. The zero value is ready to use.

func (*Ledger) Forget

func (l *Ledger) Forget(name string)

Forget drops what is recorded for name.

func (*Ledger) Holds

func (l *Ledger) Holds(name string, config map[string]any) bool

Holds reports whether name is recorded under exactly config.

func (*Ledger) Record

func (l *Ledger) Record(name string, config map[string]any)

Record notes config as the configuration name is served under. A configuration that cannot be encoded is forgotten instead, so it never matches.

Jump to

Keyboard shortcuts

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