Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
// Frequency is how often the check should be retried when we are trying to
// detect if the service comes online.
Frequency time.Duration `yaml:"frequency" validate:"required"`
// Maximum is the maximum number of attempts to make before giving up on
// the service coming online.
Maximum int `yaml:"maximum" validate:"required"`
HTTP *HTTPCheck `yaml:"http" validate:"required"`
}
type HTTPCheck ¶
type HTTPCheck struct {
// Host is the IP/Hostname + Port combination to connect to when making the
// request.
Host string `yaml:"-"`
// ExpectedStatus is the status code we expect the HTTP response to have.
// It defaults to 200.
ExpectedStatus int `yaml:"expectedStatus"`
// Path is the path that the HTTP request should be made to.
Path string `yaml:"path"`
// Headers is a slice of headers to attach to the HTTP request.
Headers []HTTPHeader `yaml:"headers"`
// Timeout is the amount of time to allow for the request, failing if the
// request takes longer. This defaults to 5 seconds.
Timeout time.Duration `yaml:"timeout"`
}
type HTTPHeader ¶
Click to show internal directories.
Click to hide internal directories.