Documentation
¶
Overview ¶
pkg/provider/redis/provider.go
Redis provider for Orkestra.
Handles the "cache" block in Katalog declarations. Uses go-redis/v9 — the standard Redis client for Go.
Supported resource kinds:
acluser — Redis ACL user (create, update password and rules, delete) config — Redis server configuration (SET and persist across restarts via CONFIG SET)
Installation:
go get github.com/redis/go-redis/v9
Registration:
p, err := cacheprovider.NewFromAuth(ctx, auth) registry.Register(p)
Auth keys (providers[].auth block):
addr — server address as host:port (default: localhost:6379) password — server password / default user password (default: empty) db — logical database index (default: 0) tls — "true" to enable TLS (default: false)
Katalog:
providers:
- name: cache
required: true
auth:
addr: "$REDIS_ADDR"
password: "$REDIS_PASSWORD"
operatorBox:
providers:
cache:
- acluser:
name: "{{ .spec.cacheUser }}"
password: "{{ .spec.cachePassword }}"
rules: "~* &* +@all"
credentials:
secretName: "{{ .metadata.name }}-cache-creds" # REDIS_PASSWORD key
- config:
key: maxmemory-policy
value: allkeys-lru
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements orktypes.Provider for the "cache" block.
func NewFromAddr ¶
NewFromAddr creates a Redis provider from an address and optional password.
func NewFromAuth ¶
NewFromAuth creates a Redis provider from a Katalog auth map. Keys: addr, password, db, tls.
Click to show internal directories.
Click to hide internal directories.