Documentation
¶
Index ¶
- func Module() fx.Option
- func ProvideRouteMapping(c HealthHandler, cfg Config) xhttp.RouteMapping
- func RegisterHealthChecks(h HealthHandler, checks ChecksMappings, logger xlog.OptionalLogger)
- type CheckMapping
- type Checker
- type ChecksMappings
- type Config
- type HealthHandler
- type HealthHandlerQualifier
- type LoadConfigParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProvideRouteMapping ¶
func ProvideRouteMapping(c HealthHandler, cfg Config) xhttp.RouteMapping
ProvideRouteMapping provide and Server HTTP Route to be registered by the server module.
func RegisterHealthChecks ¶
func RegisterHealthChecks(h HealthHandler, checks ChecksMappings, logger xlog.OptionalLogger)
RegisterHealthChecks register the checks populated in ChecksMappings.
Types ¶
type CheckMapping ¶
CheckMapping wrap the return of a health check.
func NewCheckMapping ¶
func NewCheckMapping(name string, checker health.Checker) CheckMapping
type ChecksMappings ¶
ChecksMappings hold all checks registered by the container.
type Config ¶
type Config struct {
Path string
}
Config holds health check configuration.
func LoadConfig ¶
func LoadConfig(params LoadConfigParams) (Config, error)
type HealthHandler ¶
HealthHandler ir necessary to access the healthcheck by name
type HealthHandlerQualifier ¶
HealthHandlerQualifier is necessary to give a name to the health check
func NewHealth ¶
func NewHealth() HealthHandlerQualifier
NewHealth create a new healthChecker and register the available checks.
Click to show internal directories.
Click to hide internal directories.