Documentation
¶
Index ¶
- func FailSaveAddress(address string) (string, error)
- type CheckHandler
- type CheckHandlerConfiguration
- func (c CheckHandlerConfiguration) WithCheck(name string, check checker) CheckHandlerConfiguration
- func (c CheckHandlerConfiguration) WithLimit(n int) CheckHandlerConfiguration
- func (c CheckHandlerConfiguration) WithLogger(l log.Logger) CheckHandlerConfiguration
- func (c CheckHandlerConfiguration) WithStatusFailed(status int) CheckHandlerConfiguration
- func (c CheckHandlerConfiguration) WithStatusSuccess(status int) CheckHandlerConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailSaveAddress ¶
FailSaveAddress replaces wildcard addresses with the outbound IP.
Types ¶
type CheckHandler ¶
type CheckHandler struct {
// contains filtered or unexported fields
}
CheckHandler is a http Handler that performs different checks.
func NewCheckHandler ¶
func NewCheckHandler(c CheckHandlerConfiguration) *CheckHandler
NewCheckHandler initializes a new CheckHandler.
func (*CheckHandler) ServeHTTP ¶
func (h *CheckHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type CheckHandlerConfiguration ¶
type CheckHandlerConfiguration struct {
// contains filtered or unexported fields
}
CheckHandlerConfiguration defines the configuration for the CheckHandler.
func NewCheckHandlerConfiguration ¶
func NewCheckHandlerConfiguration() CheckHandlerConfiguration
NewCheckHandlerConfiguration initializes a new CheckHandlerConfiguration.
func (CheckHandlerConfiguration) WithCheck ¶
func (c CheckHandlerConfiguration) WithCheck(name string, check checker) CheckHandlerConfiguration
WithCheck sets a check for the CheckHandlerConfiguration.
func (CheckHandlerConfiguration) WithLimit ¶
func (c CheckHandlerConfiguration) WithLimit(n int) CheckHandlerConfiguration
WithLimit limits the number of active goroutines for the checks to at most n
func (CheckHandlerConfiguration) WithLogger ¶
func (c CheckHandlerConfiguration) WithLogger(l log.Logger) CheckHandlerConfiguration
WithLogger sets the logger for the CheckHandlerConfiguration.
func (CheckHandlerConfiguration) WithStatusFailed ¶
func (c CheckHandlerConfiguration) WithStatusFailed(status int) CheckHandlerConfiguration
WithStatusFailed sets the status code for the failed checks.
func (CheckHandlerConfiguration) WithStatusSuccess ¶
func (c CheckHandlerConfiguration) WithStatusSuccess(status int) CheckHandlerConfiguration
WithStatusSuccess sets the status code for the successful checks.
Click to show internal directories.
Click to hide internal directories.