Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = types.Module{ {CreateFunc: NewHTTPConfig}, {CreateFunc: NewHTTP}, {CreateFunc: Adapter}, }
Functions ¶
func HandlerFunc ¶
func HandlerFunc(opts ...Option) http.HandlerFunc
HandlerFunc returns an http.HandlerFunc to mount the API implementation at a specific route
func ReadReleaseIDFromPath ¶
Types ¶
type AdapterOut ¶
func Adapter ¶
func Adapter(in AdapterIn) AdapterOut
type Checker ¶
Checker checks the status of the dependency and returns error. In case the dependency is working as expected, return nil.
type CheckerFunc ¶
type Config ¶
type Config struct { ListenAddr string KeepaliveTime time.Duration KeepaliveTimeout time.Duration ReleaseID string }
func NewHTTPConfig ¶
type CustomServer ¶
type CustomServerList ¶
type CustomServerList struct { dig.In CustomServers []CustomServer `group:"custom_http_servers"` }
type Option ¶
type Option func(*health)
Option adds optional parameter for the HealthcheckHandlerFunc
func WithChecker ¶
WithChecker adds a status checker that needs to be added as part of healthcheck. i.e database, cache or any external dependency
func WithObserver ¶
WithObserver adds a status checker but it does not fail the entire status.
func WithReleaseID ¶
func WithTimeout ¶
WithTimeout configures the global timeout for all individual checkers.
Click to show internal directories.
Click to hide internal directories.