Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO struct {
*redis.Client
}
DAO struct provides access to Redis
type Key ¶
type Key string
Key is an string alias representing Redis key. Implementation of Key wrapper comes with number of utility functions. Key wraps number of tokens separated with a ":" separator, for example: "foo", "foo:bar", "foo:bar:foobar", etc. Last token is called ID, all other tokens taken together are called PREFIX.
func CreateContainedInKey ¶
CreateContainedInKey utility function which produces key for CONTAINEDIN relation, for example: "CONTAINEDIN:CHASSIS"
func CreateContainsKey ¶
CreateContainsKey utility function which produces key for CONTAINS relation, for example: "CONTAINS:CHASSIS"
func (Key) WithWildcard ¶
WithWildcard returns key which contains value of current key(k) concatenated with wildcard("*")
type TLSConfig ¶
type TLSConfig func(*config.PluginConfig) (*tls.Config, error)
TLSConfig is a custom type created for for function declaration
var GetTLSConfig TLSConfig = func(c *config.PluginConfig) (*tls.Config, error) { caCert, err := ioutil.ReadFile(c.PKIRootCAPath) if err != nil { return &tls.Config{}, err } pool := x509.NewCertPool() pool.AppendCertsFromPEM(caCert) cert, err := tls.LoadX509KeyPair(c.PKICertificatePath, c.PKIPrivateKeyPath) if err != nil { return &tls.Config{}, err } cfg := &tls.Config{ RootCAs: pool, MinVersion: c.TLSConf.MinVersion, Certificates: []tls.Certificate{cert}, } return cfg, nil }
GetTLSConfig gets the plugin configuration and returns the tls client configuration for redis server authentication