Documentation ¶
Index ¶
- func NewServer(c HTTPMonitoringConfig, l log.Logger, leader LeaderChecker, ...) *httpserver.HTTPServer
- func RegisterHTTPMonitoring(c HTTPMonitoringConfig, l log.Logger, leader LeaderChecker, ...) chi.Router
- type HTTPHealthMonitoring
- type HTTPLeaderMonitoring
- type HTTPMonitoringConfig
- type HealthStatus
- type Healther
- type LeaderChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(c HTTPMonitoringConfig, l log.Logger, leader LeaderChecker, healthers map[string]Healther) *httpserver.HTTPServer
func RegisterHTTPMonitoring ¶
func RegisterHTTPMonitoring(c HTTPMonitoringConfig, l log.Logger, leader LeaderChecker, healthers map[string]Healther) chi.Router
Types ¶
type HTTPHealthMonitoring ¶
type HTTPHealthMonitoring struct { httpserver.HTTPResponder // contains filtered or unexported fields }
func NewHTTPHealthMonitoring ¶
func NewHTTPHealthMonitoring(healther Healther, leader LeaderChecker, c HTTPMonitoringConfig, l log.Logger) HTTPHealthMonitoring
func (HTTPHealthMonitoring) HandleIsHealthy ¶
func (a HTTPHealthMonitoring) HandleIsHealthy(w http.ResponseWriter, r *http.Request)
type HTTPLeaderMonitoring ¶
type HTTPLeaderMonitoring struct { httpserver.HTTPResponder // contains filtered or unexported fields }
func NewHTTPLeaderMonitoring ¶
func NewHTTPLeaderMonitoring(leader LeaderChecker, l log.Logger) HTTPLeaderMonitoring
func (HTTPLeaderMonitoring) HandleIsLeader ¶
func (a HTTPLeaderMonitoring) HandleIsLeader(w http.ResponseWriter, r *http.Request)
type HTTPMonitoringConfig ¶
type HealthStatus ¶
type Healther ¶
type Healther interface {
GetHealthStatus() HealthStatus
}
Healther incapsulates logic about health checking.
type LeaderChecker ¶
type LeaderChecker interface { // IsLeader returns whether app is running controllers or not. IsLeader() bool }
Click to show internal directories.
Click to hide internal directories.