Documentation ¶
Index ¶
- type Checker
- type Option
- func WithAddress(address string) Option
- func WithFailureThreshold(threshold int) Option
- func WithHTTPClient(client *http.Client) Option
- func WithHealthyStateInterval(interval time.Duration) Option
- func WithRequestTimeout(timeout time.Duration) Option
- func WithSuccessStatusCode(code int) Option
- func WithUnHealthyStateInterval(interval time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker is a health checker which reports to whether the target actor app endpoint is in a healthy state, according to the configured status code.
func (*Checker) HealthChannel ¶
type Option ¶
type Option func(o *options)
Option is a function that applies a health check option.
func WithAddress ¶
WithAddress sets the endpoint address for the health check.
func WithFailureThreshold ¶
WithFailureThreshold sets the failure threshold for the health check.
func WithHTTPClient ¶
WithHTTPClient sets the http.Client to use.
func WithHealthyStateInterval ¶
WithHealthyStateInterval sets the interval for the health check.
func WithRequestTimeout ¶
WithRequestTimeout sets the request timeout for the health check.
func WithSuccessStatusCode ¶
WithSuccessStatusCode sets the status code for the health check.
func WithUnHealthyStateInterval ¶
WithUnHealthyStateInterval sets the interval for the health check.