Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultLivenessEndpoint = "/livez" DefaultReadinessEndpoint = "/readyz" )
Variables ¶
View Source
var ConfigDefault = Config{ LivenessProbe: defaultLivenessProbe, ReadinessProbe: defaultReadinessProbe, LivenessEndpoint: DefaultLivenessEndpoint, ReadinessEndpoint: DefaultReadinessEndpoint, }
ConfigDefault is the default config
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool
// Function used for checking the liveness of the application. Returns true if the application
// is running and false if it is not. The liveness probe is typically used to indicate if
// the application is in a state where it can handle requests (e.g., the server is up and running).
//
// Optional. Default: func(c *fiber.Ctx) bool { return true }
LivenessProbe HealthChecker
// HTTP endpoint at which the liveness probe will be available.
//
// Optional. Default: "/livez"
LivenessEndpoint string
// Function used for checking the readiness of the application. Returns true if the application
// is ready to process requests and false otherwise. The readiness probe typically checks if all necessary
// services, databases, and other dependencies are available for the application to function correctly.
//
// Optional. Default: func(c *fiber.Ctx) bool { return true }
ReadinessProbe HealthChecker
// HTTP endpoint at which the readiness probe will be available.
// Optional. Default: "/readyz"
ReadinessEndpoint string
}
Config defines the configuration options for the healthcheck middleware.
type HealthChecker ¶
HealthChecker defines a function to check liveness or readiness of the application
type HealthCheckerHandler ¶
type HealthCheckerHandler func(HealthChecker) fiber.Handler
ProbeCheckerHandler defines a function that returns a ProbeChecker
Click to show internal directories.
Click to hide internal directories.