Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a Redis connection with a key prefix.
func New ¶
New parses the config, connects, and verifies with a PING.
Redis is a best-effort cache layer under the Postgres-primary stores (see #262) — requests block on Postgres, not Redis. A sluggish or unreachable Redis must fail fast so mirror writes / cache reads don't hold a request for the go-redis default (3s write, 3s read, 5s dial). 500 ms is long enough for a healthy local Redis and short enough that a 30 s restart adds ≤ 500 ms per affected operation.
func TestClient ¶
TestClient creates a redisstate.Client connected to the given addr (typically miniredis) with no authentication. Exported so session/registry/server test packages can use it.
func (*Client) Key ¶
Key returns the prefixed key for the given components. Key("session", "abc") -> "blockyard:session:abc"