Documentation
¶
Index ¶
- type HealthChecker
- func (hc *HealthChecker) AddUpstreams(upstreams []*upstream.Cache)
- func (hc *HealthChecker) RemoveUpstream(upstream *upstream.Cache)
- func (hc *HealthChecker) SetHealthChangeNotifier(ch chan<- HealthStatusChange)
- func (hc *HealthChecker) Start(ctx context.Context)
- func (hc *HealthChecker) Trigger() chan struct{}
- type HealthStatusChange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker is responsible for checking the health of upstream caches.
func (*HealthChecker) AddUpstreams ¶
func (hc *HealthChecker) AddUpstreams(upstreams []*upstream.Cache)
AddUpstream adds a new upstream cache to monitor.
func (*HealthChecker) RemoveUpstream ¶
func (hc *HealthChecker) RemoveUpstream(upstream *upstream.Cache)
RemoveUpstream removes an upstream cache from monitoring.
func (*HealthChecker) SetHealthChangeNotifier ¶
func (hc *HealthChecker) SetHealthChangeNotifier(ch chan<- HealthStatusChange)
SetHealthChangeNotifier sets the channel to notify about health status changes.
func (*HealthChecker) Start ¶
func (hc *HealthChecker) Start(ctx context.Context)
Start starts the health checker.
func (*HealthChecker) Trigger ¶
func (hc *HealthChecker) Trigger() chan struct{}
Trigger forces the health check to run now.
type HealthStatusChange ¶
HealthStatusChange represents a change in upstream health status.
Click to show internal directories.
Click to hide internal directories.