http

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(opts ...Option) http.Handler

Handler returns an http.Handler

It returns status 204 if all healthcheckers returns true. It returns status 503 (unhealthy) if anyone healthcheckers returns false.

func HandlerFunc

func HandlerFunc(opts ...Option) http.HandlerFunc

HandlerFunc returns an http.HandlerFunc.

Types

type Option

type Option func(*health)

Option adds optional parameter for the HealthcheckHandler.

func WithHealthCheckFuncs

func WithHealthCheckFuncs(f ...daemon.HealthCheckFunc) Option

WithHealthCheckFuncs adds the functions healthcheck of daemon that needs to be added as part of healthcheck.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout sets the global timeout for all healthcheckers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL