checkers

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcClientChecker

func NewGrpcClientChecker(conn *grpc.ClientConn) health.Checker

Types

type Checker

type Checker struct {
	Redis Redis
}

Checker is a checker that check a given redis

func NewCheckerWithRedis

func NewCheckerWithRedis(redis Redis) Checker

NewCheckerWithRedis returns a new redis.Checker configured with a custom Redis implementation

func (Checker) Check

func (c Checker) Check() health.Health

Check obtain the version string from redis info command

type DomainChecker

type DomainChecker struct {
	URL     string
	Timeout time.Duration
}

func NewDomain

func NewDomain(url string) DomainChecker

func NewDomainWithTimeout

func NewDomainWithTimeout(url string, timeout time.Duration) DomainChecker

func (DomainChecker) Check

func (u DomainChecker) Check() health.Health

type Redis

type Redis interface {
	GetVersion() (string, error)
}

Redis is a interface used to abstract the access of the Version string

type ShutDownChecker

type ShutDownChecker struct{}

func ShutDown

func ShutDown() *ShutDownChecker

func (ShutDownChecker) Check

func (ShutDownChecker) Check() health.Health

Jump to

Keyboard shortcuts

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