Documentation ¶
Index ¶
- Constants
- type ApplicationHealthDetailed
- type EnvChecker
- type GarbageCollectionMaxChecker
- type GoroutineChecker
- type HealthCheckHandler
- type HealthChecker
- type HealthCheckerApplication
- func (app *HealthCheckerApplication) AddLivenessCheck(name string, check HealthCheckHandler)
- func (app *HealthCheckerApplication) AddReadinessCheck(name string, check HealthCheckHandler)
- func (app *HealthCheckerApplication) LivenessCheck() ApplicationHealthDetailed
- func (app *HealthCheckerApplication) RedinessCheck() ApplicationHealthDetailed
- type Integration
- type Ping
Constants ¶
View Source
const (
DEFAULT_GC_PAUSE_THRESHOLD = time.Duration(10) * time.Millisecond
)
View Source
const (
DEFAULT_GR_THRESHOLD = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvChecker ¶
type EnvChecker struct {
// contains filtered or unexported fields
}
func NewEnvChecker ¶
func NewEnvChecker(envFilePath string) *EnvChecker
Used to check env file existed or not
func (*EnvChecker) Check ¶
func (ec *EnvChecker) Check(name string) Integration
Check implements healthchecks.HealthCheckHandler.
type GarbageCollectionMaxChecker ¶
type GarbageCollectionMaxChecker struct {
// contains filtered or unexported fields
}
func NewGarbageCollectionMaxChecker ¶
func NewGarbageCollectionMaxChecker(threshold time.Duration) *GarbageCollectionMaxChecker
GCMaxPauseCheck returns a Check that fails if any recent Go garbage collection pause exceeds the provided threshold.
func (*GarbageCollectionMaxChecker) Check ¶
func (gc *GarbageCollectionMaxChecker) Check(name string) Integration
Check implements HealthCheckHandler.
type GoroutineChecker ¶
type GoroutineChecker struct {
// contains filtered or unexported fields
}
func NewGoroutineChecker ¶
func NewGoroutineChecker(threshold int) *GoroutineChecker
func (*GoroutineChecker) Check ¶
func (gr *GoroutineChecker) Check(name string) Integration
GoroutineCountCheck returns a Check that fails if too many goroutines are running (which could indicate a resource leak).
type HealthCheckHandler ¶
type HealthCheckHandler interface {
Check(name string) Integration
}
type HealthChecker ¶
type HealthChecker interface { AddLivenessCheck(name string, check HealthCheckHandler) AddReadinessCheck(name string, check HealthCheckHandler) LivenessCheck() ApplicationHealthDetailed RedinessCheck() ApplicationHealthDetailed }
func NewHealthChecker ¶
func NewHealthChecker(name, version string) HealthChecker
type HealthCheckerApplication ¶
type HealthCheckerApplication struct { Name string Version string // contains filtered or unexported fields }
func (*HealthCheckerApplication) AddLivenessCheck ¶
func (app *HealthCheckerApplication) AddLivenessCheck(name string, check HealthCheckHandler)
AddLivenessCheck implements HealthChecker.
func (*HealthCheckerApplication) AddReadinessCheck ¶
func (app *HealthCheckerApplication) AddReadinessCheck(name string, check HealthCheckHandler)
AddReadinessCheck implements HealthChecker.
func (*HealthCheckerApplication) LivenessCheck ¶
func (app *HealthCheckerApplication) LivenessCheck() ApplicationHealthDetailed
LivenessCheck implements HealthChecker.
func (*HealthCheckerApplication) RedinessCheck ¶
func (app *HealthCheckerApplication) RedinessCheck() ApplicationHealthDetailed
RedinessCheck implements HealthChecker.
type Integration ¶
type Ping ¶
type Ping struct { URL string Method string Timeout time.Duration Body interface{} Headers map[string]string // contains filtered or unexported fields }
func NewPingChecker ¶
func NewPingChecker(URL, method string, timeout time.Duration, body interface{}, headers map[string]string) *Ping
NewPingChecker : time - millisecond
func (Ping) Check ¶
func (p Ping) Check(name string) Integration
Click to show internal directories.
Click to hide internal directories.