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 ¶
func OptionTest(testCommand string) ContainerOption
OptionTest allows overwrite a health check test command.
Click to show internal directories.
Click to hide internal directories.