healthcheck

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckConfig

type CheckConfig struct {
	Timeout int `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	MaxTry  int `json:"max_try" yaml:"max_try" mapstructure:"max_try"`
}

type Client

type Client interface {
	Readiness() error
	Liveness() error
}

type Config

type Config struct {
	Dest      string      `json:"dest" yaml:"dest" mapstructure:"dest"`
	Readiness CheckConfig `json:"readiness" yaml:"readiness" mapstructure:"readiness"`
	Liveness  CheckConfig `json:"liveness" yaml:"liveness" mapstructure:"liveness"`
}

func DefaultConfig

func DefaultConfig(dest string) *Config

func (*Config) Validate

func (conf *Config) Validate() error

type Server

type Server interface {
	Connect(ctx context.Context) error
	Disconnect(ctx context.Context) error
	Readiness(check func() error) error
	Liveness(check func() error) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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