config

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordConfig

type PasswordConfig struct {
	PasswordFile string
}

PasswordConfig contains a path to a file containing a password used for authentication with Redis nodes.

func (PasswordConfig) LoadPassword

func (c PasswordConfig) LoadPassword() (string, error)

LoadPassword returns the password loaded from the inner `File`.

type RedisOpts

type RedisOpts struct {
	// NodeAddr is the <address>:<port> that Redis expects connections on. This
	// field is required.
	NodeAddr string

	// Username is used for authentication with Redis nodes. This field is
	// required.
	Username string

	// PasswordConfig contains a path to a file containing a password used for
	// authentication with Redis nodes. This field is required.
	PasswordConfig

	// TLSConfig contains the paths to certificates and a key used by the
	// redis-go client and redis-cli to interact with Redis nodes using mutual
	// TLS. This field is required.
	TLSConfig
}

RedisOpts contains the configuration for interacting with the node this serves as a sidecar to and, if one exists, the Redis Cluster.

type TLSConfig

type TLSConfig struct {
	// CertFile is the path to a PEM formatted Certificate.
	CertFile string
	// KeyFile is the path to a PEM formatted Private Key.
	KeyFile string
	// CACertFile is the path to a PEM formatted CA Certificate.
	CACertFile string
}

TLSConfig contains the paths to certificates and a key used by the redis-go client and redis-cli to interact with Redis nodes using mutual TLS.

func (TLSConfig) LoadTLS

func (c TLSConfig) LoadTLS() (*tls.Config, error)

LoadTLS reads and parses the certificates and key provided by the TLSConfig and returns a *tls.Config suitable for redis-go client use.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL