Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Description describes which functionality this health check implements. Description = "Ensure microstorage availability." // Name is the identifier of the health check. This can be used for emitting // metrics. Name = "microstorage" // SuccessMessage is the message returned in case the health check did not // fail. SuccessMessage = "all good" // Timeout is the time being waited until timing out health check, which // renders its result unsuccessful. Timeout = 10 * time.Second )
Variables ¶
View Source
var ( HealthCheckK = microstorage.MustK(microstorage.NewK("microstorage-health-check-key")) HealthCheckKV = microstorage.MustKV(microstorage.NewKV(HealthCheckK.Key(), "microstorage-health-check-value")) )
Functions ¶
func IsExecutionFailed ¶
IsExecutionFailed asserts executionFailedError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct {
// Dependencies.
Logger micrologger.Logger
Storage microstorage.Storage
// Settings.
Timeout time.Duration
}
Config represents the configuration used to create a healthz service.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig provides a default configuration to create a new healthz service by best effort.
Click to show internal directories.
Click to hide internal directories.