connledger

package
v1.169.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 3 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 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