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

protection

package
v0.1.49 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 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