protection

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	Protected bool
	Acquired  bool
	RuleID    string
	ClaimKey  string
}

Claim describes one pre-dispatch protection decision.

type Guard

type Guard interface {
	IsProtected(name string) bool
	Claim(ctx context.Context, name string, args map[string]interface{}) (Claim, error)
	Finish(ctx context.Context, claim Claim, state State)
}

Guard is the narrow concrete-registry durable protection contract.

type State

type State string
const (
	StateCompleted State = "completed"
	StateFailed    State = "failed"
	StateUnknown   State = "unknown"
)

Jump to

Keyboard shortcuts

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