Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(c Config) endpoint.Middleware
New returns a new stale middleware This middleware marks the application as unhealthy if no request is received in the allotted time.
If a request is received after being unhealthy, it's not considered stale anymore abd becomes healthy again.
Types ¶
type Config ¶
type Config struct { Logger *zerolog.Logger MaxTimeBetweenRequests time.Duration StartCheckAfter time.Duration HealthinessPobe app.Probe }
Config is a struct used to configure a new stale middleware.
func NewDefaultConfig ¶
func NewDefaultConfig(pg *app.ProbeGroup) Config
NewDefaultConfig returns a new `Config` with all values filled with a sane default.
Click to show internal directories.
Click to hide internal directories.