Documentation
¶
Overview ¶
Package command Tellstone Shared Command Layer File: command.go Description: The data-command core shared by both frontends (binary and RESP). GET, SET and DEL live here exactly once: argument validation, optional EX/PX TTL parsing, the RBAC gate, the per-role command count, the audit hooks and the storage access. Each protocol only supplies Reply and its own calling conventions;
Authors:
Maximilian Hagen
Package command Tellstone Shared Command Layer File: handlers.go Description: The GET, SET and DEL handlers, plus the EX/PX TTL parser moved out of the RESP frontend. These are the single source of truth for data-command semantics; the binary and RESP frontends call Execute and encode the reply through Reply.
Authors:
Maximilian Hagen
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
Name string
RbacID uint16
Arity int
Keys func([][]byte) [][]byte
Handler func(*Ctx)
}
Command describes one data command: the minimum argument count
which arguments are keys for the gate, and what to execute.
type Ctx ¶
type Ctx struct {
Store Store
Args [][]byte
Reply Reply
TTL time.Duration
Policy *rbac.Store
Session *rbac.SessionContext
Remote string
Protocol string
Audit *audit.LogEngine
Logger log.Logger
}
Ctx is built for one request. Pool the Ctx per connection