Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityChecker ¶
type AvailabilityChecker interface {
AvailabilityCheck() error
}
AvailabilityChecker is an interface that enables implementations of AvailabilityChecker
func GetHTTPAvailabilityChecker ¶
func GetHTTPAvailabilityChecker(c Config) (AvailabilityChecker, error)
GetHTTPAvailabilityChecker returns a HTTP implementation of the AvailabilityChecker interface.
type AvailabilityCheckers ¶
type AvailabilityCheckers []AvailabilityChecker
AvailabilityCheckers is a slice of AvailabilityChecker
func GetAvailabilityCheckers ¶
func GetAvailabilityCheckers(availCfg *ExtDependencyAvailabilityCheck) (AvailabilityCheckers, error)
GetAvailabilityCheckers returns a GetAvailabilityCheckers containing configured GetAvailabilityChecker
type Config ¶
type Config interface{}
Config is an interface type used for AvailabilityChecker config
type ExtDependencyAvailabilityCheck ¶
type ExtDependencyAvailabilityCheck struct {
HTTP HTTPTargets `yaml:"http"`
}
ExtDependencyAvailabilityCheck holds fields for external dependencies
func (*ExtDependencyAvailabilityCheck) GetTimeoutDuration ¶
func (e *ExtDependencyAvailabilityCheck) GetTimeoutDuration() time.Duration
GetTimeoutDuration returns the timeout duration from the ExtDependencyAvailabilityCheck type
type HTTPAvailabilityChecker ¶
HTTPAvailabilityChecker type provides target and timeout fields for http checks
func (HTTPAvailabilityChecker) AvailabilityCheck ¶
func (h HTTPAvailabilityChecker) AvailabilityCheck() error
AvailabilityCheck accepts a slice of HTTP targets accompanied by a timeout and asynchronously checks the targets to deem them available. If any of the targets are deemed unhealthy, all running routines are cancelled and an error is returned.
type HTTPConfig ¶
HTTPConfig type provides target and timeout fields for http config
type HTTPTargets ¶
HTTPTargets holds fields describing http targets