Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotkubeStatus ¶
type BotkubeStatus string
const ( BotkubeStatusHealthy BotkubeStatus = "Healthy" BotkubeStatusUnhealthy BotkubeStatus = "Unhealthy" )
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker gives health bot agent status.
func NewChecker ¶
NewChecker create new health checker.
func (*Checker) ServeHTTP ¶
func (h *Checker) ServeHTTP(resp http.ResponseWriter, _ *http.Request)
ServeHTTP serves status on health endpoint.
func (*Checker) SetNotifiers ¶
SetNotifiers sets platform bots instances.
type FailureReasonMsg ¶
type FailureReasonMsg string
const ( FailureReasonQuotaExceeded FailureReasonMsg = "Quota exceeded" FailureReasonMaxRetriesExceeded FailureReasonMsg = "Max retries exceeded" FailureReasonConnectionError FailureReasonMsg = "Connection error" )
type Notifier ¶
type Notifier interface {
GetStatus() PlatformStatus
}
Notifier represents notifier interface
type PlatformStatus ¶
type PlatformStatus struct { Status PlatformStatusMsg `json:"status,omitempty"` Restarts string `json:"restarts,omitempty"` Reason FailureReasonMsg `json:"reason,omitempty"` }
PlatformStatus defines single platform status
type PlatformStatusMsg ¶
type PlatformStatusMsg string
const ( StatusUnknown PlatformStatusMsg = "Unknown" StatusHealthy PlatformStatusMsg = "Healthy" StatusUnHealthy PlatformStatusMsg = "Unhealthy" )
Click to show internal directories.
Click to hide internal directories.