Documentation ¶
Index ¶
- type RedisStorage
- func (RedisStorage) CaddyModule() caddy.ModuleInfo
- func (rs *RedisStorage) CertMagicStorage() (certmagic.Storage, error)
- func (rs *RedisStorage) Cleanup() error
- func (rs RedisStorage) Delete(ctx context.Context, key string) error
- func (rs RedisStorage) Exists(ctx context.Context, key string) bool
- func (rs RedisStorage) List(ctx context.Context, dir string, recursive bool) ([]string, error)
- func (rs RedisStorage) Load(ctx context.Context, key string) ([]byte, error)
- func (rs *RedisStorage) Lock(ctx context.Context, name string) error
- func (rs *RedisStorage) Provision(ctx caddy.Context) error
- func (rs *RedisStorage) Repair(ctx context.Context, dir string) error
- func (rs RedisStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)
- func (rs RedisStorage) Store(ctx context.Context, key string, value []byte) error
- func (rs RedisStorage) String() string
- func (rs *RedisStorage) Unlock(ctx context.Context, name string) error
- func (rs *RedisStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- type StorageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStorage ¶
type RedisStorage struct { ClientType string `json:"client_type"` Address []string `json:"address"` Host []string `json:"host"` Port []string `json:"port"` DB int `json:"db"` Timeout string `json:"timeout"` Username string `json:"username"` Password string `json:"password"` MasterName string `json:"master_name"` KeyPrefix string `json:"key_prefix"` EncryptionKey string `json:"encryption_key"` Compression bool `json:"compression"` // TlsEnabled controls whether TLS will be used to connect to the Redis // server. False by default. TlsEnabled bool `json:"tls_enabled"` // TlsInsecure controls whether the client will verify the server // certificate. See `InsecureSkipVerify` in `tls.Config` for details. True // by default. // https://pkg.go.dev/crypto/tls#Config TlsInsecure bool `json:"tls_insecure"` // TlsServerCertsPEM is a series of PEM encoded certificates that will be // used by the client to validate trust in the Redis server's certificate // instead of the system trust store. May not be specified alongside // `TlsServerCertsPath`. See `x509.CertPool.AppendCertsFromPem` for details. // https://pkg.go.dev/crypto/x509#CertPool.AppendCertsFromPEM TlsServerCertsPEM string `json:"tls_server_certs_pem"` // TlsServerCertsPath is the path to a file containing a series of PEM // encoded certificates that will be used by the client to validate trust in // the Redis server's certificate instead of the system trust store. May not // be specified alongside `TlsServerCertsPem`. See // `x509.CertPool.AppendCertsFromPem` for details. // https://pkg.go.dev/crypto/x509#CertPool.AppendCertsFromPEM TlsServerCertsPath string `json:"tls_server_certs_path"` RouteByLatency bool `json:"route_by_latency"` RouteRandomly bool `json:"route_randomly"` // contains filtered or unexported fields }
RedisStorage implements Redis storage plugin functionality for Caddy. It supports connecting to standalone, Cluster, or Sentinal (Failover) Redis servers.
func (RedisStorage) CaddyModule ¶
func (RedisStorage) CaddyModule() caddy.ModuleInfo
func (*RedisStorage) CertMagicStorage ¶
func (rs *RedisStorage) CertMagicStorage() (certmagic.Storage, error)
func (*RedisStorage) Cleanup ¶
func (rs *RedisStorage) Cleanup() error
func (*RedisStorage) Provision ¶
func (rs *RedisStorage) Provision(ctx caddy.Context) error
Provision module function called by Caddy Server
func (RedisStorage) String ¶
func (rs RedisStorage) String() string
func (*RedisStorage) Unlock ¶
func (rs *RedisStorage) Unlock(ctx context.Context, name string) error
func (*RedisStorage) UnmarshalCaddyfile ¶
func (rs *RedisStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Click to show internal directories.
Click to hide internal directories.