Documentation ¶
Index ¶
- Variables
- func ChooseActiveBackend(backendHealths map[*domain.Backend]*BackendStatus, useLowestIndex bool) *domain.Backend
- type BackendStatus
- type ClusterMonitor
- func (c *ClusterMonitor) Monitor(stopChan <-chan interface{})
- func (c *ClusterMonitor) QueryBackendHealth(backend *domain.Backend, healthMonitor *BackendStatus, client UrlGetter)
- func (c *ClusterMonitor) RegisterBackendSubscriber(newSubscriber chan<- *domain.Backend)
- func (c *ClusterMonitor) SetupCounters() *DecisionCounters
- type DecisionCounters
- type Monitor
- type Runner
- type UrlGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var UrlGetterProvider = HttpUrlGetterProvider
Functions ¶
func ChooseActiveBackend ¶
Types ¶
type BackendStatus ¶
type BackendStatus struct { Index int Healthy bool Counters *DecisionCounters }
type ClusterMonitor ¶
type ClusterMonitor struct {
// contains filtered or unexported fields
}
func NewClusterMonitor ¶
func (*ClusterMonitor) Monitor ¶
func (c *ClusterMonitor) Monitor(stopChan <-chan interface{})
func (*ClusterMonitor) QueryBackendHealth ¶
func (c *ClusterMonitor) QueryBackendHealth(backend *domain.Backend, healthMonitor *BackendStatus, client UrlGetter)
func (*ClusterMonitor) RegisterBackendSubscriber ¶
func (c *ClusterMonitor) RegisterBackendSubscriber(newSubscriber chan<- *domain.Backend)
func (*ClusterMonitor) SetupCounters ¶
func (c *ClusterMonitor) SetupCounters() *DecisionCounters
type DecisionCounters ¶
type DecisionCounters struct {
// contains filtered or unexported fields
}
func NewDecisionCounters ¶
func NewDecisionCounters() *DecisionCounters
func (*DecisionCounters) AddCondition ¶
func (c *DecisionCounters) AddCondition(taskName string, predicate func() bool)
func (*DecisionCounters) GetCount ¶
func (c *DecisionCounters) GetCount(name string) uint64
func (*DecisionCounters) IncrementCount ¶
func (c *DecisionCounters) IncrementCount(name string)
func (*DecisionCounters) ResetCount ¶
func (c *DecisionCounters) ResetCount(name string)
func (*DecisionCounters) Should ¶
func (c *DecisionCounters) Should(taskName string) bool
Click to show internal directories.
Click to hide internal directories.