Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(props *Properties) (*redis.Client, error)
func NewHealthChecker ¶
func NewHealthChecker(client *redis.Client) actuator.HealthChecker
func NewInformer ¶
func NewInformer(client *redis.Client, props *Properties) actuator.Informer
Types ¶
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func (HealthChecker) Check ¶
func (h HealthChecker) Check(ctx context.Context) actuator.StatusDetails
func (HealthChecker) Component ¶
func (h HealthChecker) Component() string
type Properties ¶
type Properties struct { Host string `validate:"required" default:"localhost"` Port int `validate:"required" default:"6379"` Database int `default:"0"` Username string Password string EnableTLS bool // Maximum number of socket connections. // Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int `default:"10"` // ConnMaxLifetime is the maximum amount of time a connection may be reused. // // Expired connections may be closed lazily before reuse. // If <= 0, connections are not closed due to a connection's age. // // Default is to not close idle connections. ConnMaxLifetime time.Duration `default:"0"` // Minimum number of idle connections which is useful when establishing // new connection is slow. MinIdleConns int `default:"2"` // ConnMaxIdleTime is the maximum amount of time a connection may be idle. // Should be less than server's timeout. // // Expired connections may be closed lazily before reuse. // If d <= 0, connections are not closed due to a connection's idle time. // // Default is 30 minutes. -1 disables idle timeout check. ConnMaxIdleTime time.Duration `default:"5m"` }
func NewProperties ¶
func NewProperties(loader config.Loader) (*Properties, error)
func (Properties) Prefix ¶
func (p Properties) Prefix() string
Click to show internal directories.
Click to hide internal directories.