Documentation
¶
Overview ¶
Package redisrules holds the one Redis endpoint rule set. It lives here so that both config and cache/redis can call it: config must not import cache/redis, and cache/redis must not import config (ADR-108). Each caller adapts a Violation into its own error type and key namespace.
Index ¶
Constants ¶
View Source
const ( ModeStandalone = "standalone" ModeCluster = "cluster" )
Transport modes. An empty Mode means ModeStandalone.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
Host, Mode, Username, Password string
Port, Database, PoolSize int
DialTimeout, ReadTimeout, WriteTimeout time.Duration
TLSEnabled bool
TLS clienttls.Material
}
Endpoint is the transport-facing slice of a Redis configuration.
type Violation ¶
type Violation struct {
Field string // relative to the redis block: "port", "tls.cafile"
Message string // reason only, config wording
Missing bool // required value absent (host)
Allowed []string // closed set: {"1-65535"}, {"standalone", "cluster"}
}
Violation is the first broken rule. Field and any sibling key named in Message are relative to the redis block, so each caller prefixes its own namespace.
Click to show internal directories.
Click to hide internal directories.