hookgate

package
v1.6.29 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 7 Imported by: 1 module, 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 hookgate is the hook gate as the nova-tools tools meet it (docs/SPEC-HOOK.md, the gate in every tool; tla/Hook.tla, GateMeansHooked): the hook module's Gate over the bus store a verb already opened, and the gate's answer as the verb's one result. Every verb that sends, reads or takes work as an identity calls Gate before it acts and acts only on nil.

Index

Constants

View Source
const Reason = "unhooked"

Reason is the stable code of a gate's no, a result's reason (tool.Out.Reasons).

Variables

View Source
var ErrNoRecord = errors.New("this bus store keeps no hook record (it is no Redis store), so nothing runs: fail closed")

ErrNoRecord is the refusal of a bus store that is no Redis: no hook record can be read from it, so nothing runs.

Functions

func Gate

func Gate(ctx context.Context, st bus.Store, w hook.Want) error

Gate is the gate for w over the bus store st: nil when w.Name is hooked in, every push of its role live and proven; else the hook's Refusal, or the store's error (fail closed: only nil lets a verb act).

func Out

func Out(err error) *tool.Out

Out is a gate's no as a verb's result: an identity not hooked in is FAILED at exit 1, reason unhooked, the hook command its remedy and every other line of the breadcrumb a NOTE; a record that could not be read is REFUSED at exit 2, the gate unable to decide (fail closed). nil for nil.

func StampCounts

func StampCounts() *schemaread.Counts

StampCounts are the per-form read counters of the stamps every store made here has read, and the refusals by reason: the evidence of a cutover.

func Store

func Store(st bus.Store) (hook.Store, error)

Store is the hook record's store over the bus store st: the same Redis, reading stamps through the shared seat reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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