health

package
v1.14.0-beta.10 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientRegister

func ClientRegister(ctx context.Context, client *redis.Client) error

func ClusterRegister

func ClusterRegister(ctx context.Context, client *redis.ClusterClient) error

func ConfigAdd

func ConfigAdd(path string)

Types

type ClientChecker

type ClientChecker struct {
	// contains filtered or unexported fields
}

ClientChecker represents redis client checker.

func NewClientChecker

func NewClientChecker(client *redis.Client) *ClientChecker

NewClientChecker creates the redis client checker.

func (*ClientChecker) Check

func (c *ClientChecker) Check(ctx context.Context) error

Check checks if redis server is responding.

type ClientHealth

type ClientHealth struct {
	// contains filtered or unexported fields
}

ClientHealth represents client health.

func NewClientHealth

func NewClientHealth() *ClientHealth

NewClientHealth returns a client health with default options.

func NewClientHealthWithConfigPath

func NewClientHealthWithConfigPath(path string) (*ClientHealth, error)

NewClientHealthWithConfigPath returns a client health with default options.

func NewClientHealthWithOptions

func NewClientHealthWithOptions(options *Options) *ClientHealth

NewClientHealthWithOptions returns a health with the options provided.

func (*ClientHealth) Register

func (i *ClientHealth) Register(ctx context.Context, client *redis.Client) error

Register registers a new ClientChecker in the health package.

type ClusterClientChecker

type ClusterClientChecker struct {
	// contains filtered or unexported fields
}

ClientHealth represents redis cluster client checker.

func NewClusterClientChecker

func NewClusterClientChecker(client *redis.ClusterClient) *ClusterClientChecker

NewClusterClientChecker creates the redis cluster client checker.

func (*ClusterClientChecker) Check

func (c *ClusterClientChecker) Check(ctx context.Context) error

Check checks if redis cluster is responding.

type ClusterHealth

type ClusterHealth struct {
	// contains filtered or unexported fields
}

ClusterHealth represents cluster health.

func NewClusterHealth

func NewClusterHealth() *ClusterHealth

NewClusterHealth returns a health with default options.

func NewClusterHealthWithConfigPath

func NewClusterHealthWithConfigPath(path string) (*ClusterHealth, error)

NewClusterHealthWithConfigPath returns a health with default options from config path.

func NewClusterHealthWithOptions

func NewClusterHealthWithOptions(options *Options) *ClusterHealth

NewClusterHealthWithOptions returns a health with the options provided.

func (*ClusterHealth) Register

func (i *ClusterHealth) Register(ctx context.Context, client *redis.ClusterClient) error

Register registers a new ClusterClientChecker in the health package.

type Options

type Options struct {
	Name        string
	Enabled     bool
	Description string
	Required    bool
}

Options struct which represents a health plugin for redis options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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