Help us shape the future of Go! Take the 2026 Go Developer Survey

health

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package health provides tools to set up container health check options.

Index

Constants

View Source
const (

	// DefaultRestoreInterval defines a default health check interval for database restoration.
	DefaultRestoreInterval = 5 * time.Second

	// DefaultRestoreRetries defines a default number of health check retries for database restoration.
	DefaultRestoreRetries = 200
)

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(username, dbname string, options ...ContainerOption) *container.HealthConfig

GetConfig builds a container health config.

Types

type ContainerOption

type ContainerOption func(h *container.HealthConfig)

ContainerOption defines a function to overwrite default options.

func OptionInterval

func OptionInterval(interval time.Duration) ContainerOption

OptionInterval allows overwrite a health check interval.

func OptionRetries

func OptionRetries(retries int) ContainerOption

OptionRetries allows overwrite retries counter.

func OptionTest added in v2.4.0

func OptionTest(testCommand string) ContainerOption

OptionTest allows overwrite a health check test command.

Jump to

Keyboard shortcuts

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