Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkable ¶
type Checkable interface {
// Checkables should return nil if ready, or an error message otherwise.
Ready() error
// Checkables should return nil if healthy, or an error message otherwise.
Healthy() error
}
Types requiring health checks should implement the Checkable interface.
type Checker ¶
type Checker interface {
// Register a service for health checks.
Register(name string, service Checkable) error
// Unregister a service.
Unregister(name string) error
// IsReady returns the current readiness of the system.
// A system is considered ready if all checks are passing (no errors)
IsReady() (ready bool, errors map[string]error)
// IsHealthy returns the current health of the system.
// A system is considered healthy if all checks are passing (no errors)
IsHealthy() (healthy bool, errors map[string]error)
Start() error
Close() error
}
Checker provides a service which can be probed for system health.
func NewChecker ¶
func NewChecker() Checker
type Config ¶ added in v1.1.0
type Config interface {
AutoPprofProfileRoot() string
AutoPprofPollInterval() models.Duration
AutoPprofGatherDuration() models.Duration
AutoPprofGatherTraceDuration() models.Duration
AutoPprofMaxProfileSize() utils.FileSize
AutoPprofCPUProfileRate() int
AutoPprofMemProfileRate() int
AutoPprofBlockProfileRate() int
AutoPprofMutexProfileFraction() int
AutoPprofMemThreshold() utils.FileSize
AutoPprofGoroutineThreshold() int
}
type Nurse ¶ added in v1.1.0
type Nurse struct {
utils.StartStopOnce
// contains filtered or unexported fields
}
func (*Nurse) GatherVitals ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.