Documentation ¶
Index ¶
- type BotStatus
- type BotkubeStatus
- type Checker
- func (h *Checker) AddNotifier(key string, notifier Notifier)
- func (h *Checker) GetStatus() *Status
- func (h *Checker) IsReady() bool
- func (h *Checker) MarkAsReady()
- func (h *Checker) NewServer(log logrus.FieldLogger, port string) *httpx.Server
- func (h *Checker) ServeHTTP(resp http.ResponseWriter, _ *http.Request)
- type Failed
- type FailureReasonMsg
- type Notifier
- type PlatformStatus
- type PlatformStatusMsg
- type PluginStatus
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotStatus ¶ added in v1.13.0
type BotStatus struct {
Status BotkubeStatus `json:"status,omitempty"`
}
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) AddNotifier ¶ added in v1.13.0
AddNotifier add platform bot instance
type Failed ¶ added in v1.13.0
type Failed struct {
// contains filtered or unexported fields
}
Failed represents failed platform.
func NewFailed ¶ added in v1.13.0
func NewFailed(failureReason FailureReasonMsg, errorMsg string) *Failed
NewFailed creates a new Failed instance.
func (*Failed) GetStatus ¶ added in v1.13.0
func (b *Failed) GetStatus() PlatformStatus
GetStatus gets bot status.
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"` ErrorMsg string `json:"errorMsg,omitempty"` }
PlatformStatus defines single platform status
type PlatformStatusMsg ¶
type PlatformStatusMsg string
const ( StatusUnknown PlatformStatusMsg = "Unknown" StatusHealthy PlatformStatusMsg = "Healthy" StatusUnHealthy PlatformStatusMsg = "Unhealthy" )
type PluginStatus ¶ added in v1.13.0
type Status ¶ added in v1.13.0
type Status struct { Botkube BotStatus `json:"botkube"` Plugins map[string]PluginStatus `json:"plugins,omitempty"` Platforms platformStatuses `json:"platforms,omitempty"` }
Status defines bot agent status.
Click to show internal directories.
Click to hide internal directories.