Documentation
¶
Index ¶
- Constants
- Variables
- type HealthCheck
- type HealthCheckAggregatedResult
- type HealthCheckResult
- type HealthCheckRunner
- func (runner *HealthCheckRunner) AddLivenessCheck(check HealthCheck) *HealthCheckRunner
- func (runner *HealthCheckRunner) AddReadinessCheck(check HealthCheck) *HealthCheckRunner
- func (runner HealthCheckRunner) RunLivenessChecks() HealthCheckAggregatedResult
- func (runner HealthCheckRunner) RunReadinessChecks() HealthCheckAggregatedResult
- type HealthCheckState
- func (source HealthCheckState) Is(target HealthCheckState) bool
- func (source HealthCheckState) IsHealthierThan(target HealthCheckState) bool
- func (source HealthCheckState) IsLessHealthierThan(target HealthCheckState) bool
- func (source HealthCheckState) MarshalJSON() ([]byte, error)
- func (source HealthCheckState) String() string
- type JsonTime
Constants ¶
View Source
const SERVICE_NAME string = "HealthChecks"
Variables ¶
View Source
var ( HealthCheckState_Unknown = HealthCheckState{/* contains filtered or unexported fields */} HealthCheckState_Unhealthy = HealthCheckState{/* contains filtered or unexported fields */} HealthCheckState_Degraded = HealthCheckState{/* contains filtered or unexported fields */} HealthCheckState_Healthy = HealthCheckState{/* contains filtered or unexported fields */} )
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶
type HealthCheck interface {
Check() HealthCheckResult
}
type HealthCheckAggregatedResult ¶
type HealthCheckAggregatedResult struct { State HealthCheckState `json:"state"` Duration JsonTime `json:"duration"` Checks []HealthCheckResult `json:"checks"` }
func (*HealthCheckAggregatedResult) Add ¶
func (hcar *HealthCheckAggregatedResult) Add(hcr HealthCheckResult)
type HealthCheckResult ¶
type HealthCheckResult struct { Name string `json:"name"` State HealthCheckState `json:"state"` Duration JsonTime `json:"duration"` Data map[string]string `json:"data"` }
type HealthCheckRunner ¶
type HealthCheckRunner struct {
// contains filtered or unexported fields
}
func NewFromHealthChecks ¶
func NewFromHealthChecks(livenessChecks []HealthCheck, readinessChecks []HealthCheck) HealthCheckRunner
func (*HealthCheckRunner) AddLivenessCheck ¶
func (runner *HealthCheckRunner) AddLivenessCheck(check HealthCheck) *HealthCheckRunner
func (*HealthCheckRunner) AddReadinessCheck ¶
func (runner *HealthCheckRunner) AddReadinessCheck(check HealthCheck) *HealthCheckRunner
func (HealthCheckRunner) RunLivenessChecks ¶
func (runner HealthCheckRunner) RunLivenessChecks() HealthCheckAggregatedResult
func (HealthCheckRunner) RunReadinessChecks ¶
func (runner HealthCheckRunner) RunReadinessChecks() HealthCheckAggregatedResult
type HealthCheckState ¶
type HealthCheckState struct {
// contains filtered or unexported fields
}
func (HealthCheckState) Is ¶
func (source HealthCheckState) Is(target HealthCheckState) bool
func (HealthCheckState) IsHealthierThan ¶
func (source HealthCheckState) IsHealthierThan(target HealthCheckState) bool
func (HealthCheckState) IsLessHealthierThan ¶
func (source HealthCheckState) IsLessHealthierThan(target HealthCheckState) bool
func (HealthCheckState) MarshalJSON ¶
func (source HealthCheckState) MarshalJSON() ([]byte, error)
func (HealthCheckState) String ¶
func (source HealthCheckState) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.