Help us shape the future of Go! Take the 2026 Go Developer Survey

capbridge

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Overview

Package capbridge lets bide audit caps ask the question only package agent can answer: whether the journal of a run records the attempt behind a cap-ledger slot as never started (the attempt marker and the not-started record that answers it are agent's private knowledge). Package agent registers the function once, in its init; the audit reads it and cannot replace it. The package is internal, so no code outside this module can reach it, and it adds nothing to the exported API of bide.

The registered function only reads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterVoided

func RegisterVoided(f VoidedFunc)

RegisterVoided sets the function Voided returns. It panics on a nil function and on a second call: the bridge is set once by package agent and is never replaced.

Types

type VoidedFunc

type VoidedFunc func(ctx context.Context, j any, s capledger.Slot) (bool, error)

VoidedFunc reports whether the journal j (an *agent.Journal) records the attempt behind the live slot s as never started. It reads and writes nothing.

func Voided

func Voided() VoidedFunc

Voided returns the registered function, or nil if package agent has not registered one (a program that links this package without agent).

Jump to

Keyboard shortcuts

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