protection

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package protection carries, in a context, which protected environments a write may change without a change request, as the context carries the write's transaction. The guard on the ruleset bump reads it; the kill switch and the application of an approved change request set it. Every other write carries none, so a new write path is guarded by construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bypass

func Bypass[E any](ctx context.Context, environments ...id.Of[E]) context.Context

Bypass returns a context under which a write changes the rulesets of environments directly, and is still refused for every other protected environment it would change: the application of a change request, whose approval covered those environments and no other.

func BypassEverywhere

func BypassEverywhere(ctx context.Context) context.Context

BypassEverywhere returns a context under which a write changes the ruleset of every protected environment directly: the kill switch, the deliberate emergency exception.

func Bypassed

func Bypassed[E any](ctx context.Context, environment id.Of[E]) bool

Bypassed reports whether a write under ctx changes environment's ruleset directly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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