Documentation
¶
Overview ¶
Package command registers and invokes audited, rate-limited control commands. Shell execution is NOT a default; handlers are in-process only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExists = errors.New("command: already registered") ErrNotFound = errors.New("command: not found") ErrDenied = errors.New("command: denied") ErrTooLarge = errors.New("command: payload too large") ErrRateLimited = errors.New("command: rate limited") ErrClosed = errors.New("command: closed") ErrIdempotency = errors.New("command: idempotency conflict") )
Functions ¶
This section is empty.
Types ¶
type Auditor ¶
type Auditor interface {
AuditCommand(actor, name, decision, outcome string)
}
Auditor receives invocation outcomes.
type Authorizer ¶
Authorizer may deny invoke.
type Config ¶
type Config struct {
Authorizer Authorizer
Auditor Auditor
MaxBodyBytes int
DefaultDeadline time.Duration
IdempotencyMax int // bounded; default 1024
}
Config configures a Registry.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds commands.
type Request ¶
type Request struct {
Name string
ActorID string
Body []byte
IdempotencyKey string
Deadline time.Duration
}
Request is an invocation.
Click to show internal directories.
Click to hide internal directories.