Documentation ¶
Index ¶
- type Aggregator
- type AggregatorOption
- type AggregatorOptions
- type HealthClientSet
- type HealthStatusQuerier
- type HealthStatusUpdater
- type HealthUpdate
- type Listener
- func (l *Listener) AlertDisconnectLoop(agentId string)
- func (l *Listener) Close()
- func (l *Listener) HandleAgentConnection(ctx context.Context, clientset agentv1.ClientSet)
- func (l *Listener) HandleConnection(ctx context.Context, clientset HealthClientSet)
- func (l *Listener) HealthC() chan HealthUpdate
- func (l *Listener) StatusC() chan StatusUpdate
- func (l *Listener) UpdateHealth(ctx context.Context, req *corev1.Health) (*emptypb.Empty, error)
- type ListenerOption
- func WithAlertProvider(alertProvider *alerting.Provider) ListenerOption
- func WithAlertToggle() ListenerOption
- func WithDefaultAlertCondition() ListenerOption
- func WithDisconnectTimeout(timeout time.Duration) ListenerOption
- func WithMaxConnections(max int64) ListenerOption
- func WithMaxJitter(duration time.Duration) ListenerOption
- func WithPollInterval(interval time.Duration) ListenerOption
- func WithUpdateQueueCap(cap int) ListenerOption
- type ListenerOptions
- type Monitor
- type MonitorOption
- type MonitorOptions
- type StatusUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶ added in v0.6.0
type Aggregator struct { controlv1.UnsafeHealthServer AggregatorOptions // contains filtered or unexported fields }
Aggregator implements a HealthServer that queries one or more HealthClients and aggregates the results. This server will report as ready if and only if all clients report as ready.
func NewAggregator ¶ added in v0.6.0
func NewAggregator(opts ...AggregatorOption) *Aggregator
func (*Aggregator) AddClient ¶ added in v0.6.0
func (h *Aggregator) AddClient(name string, client controlv1.HealthClient)
func (*Aggregator) RemoveClient ¶ added in v0.6.0
func (h *Aggregator) RemoveClient(name string)
type AggregatorOption ¶ added in v0.6.0
type AggregatorOption func(*AggregatorOptions)
func WithStaticAnnotations ¶ added in v0.6.0
func WithStaticAnnotations(staticAnnotations map[string]string) AggregatorOption
type AggregatorOptions ¶ added in v0.6.0
type AggregatorOptions struct {
// contains filtered or unexported fields
}
type HealthClientSet ¶
type HealthStatusQuerier ¶
type HealthStatusQuerier interface { GetHealthStatus(id string) *corev1.HealthStatus WatchHealthStatus(ctx context.Context, id string) <-chan *corev1.HealthStatus }
type HealthStatusUpdater ¶
type HealthStatusUpdater interface { StatusC() chan StatusUpdate HealthC() chan HealthUpdate }
type HealthUpdate ¶
type Listener ¶
type Listener struct { controlv1.UnsafeHealthListenerServer ListenerOptions AlertProvider *alerting.Provider // contains filtered or unexported fields }
func NewListener ¶
func NewListener(opts ...ListenerOption) *Listener
func (*Listener) AlertDisconnectLoop ¶ added in v0.6.0
func (*Listener) HandleAgentConnection ¶
Implements gateway.ConnectionHandler
func (*Listener) HandleConnection ¶
func (l *Listener) HandleConnection(ctx context.Context, clientset HealthClientSet)
func (*Listener) HealthC ¶
func (l *Listener) HealthC() chan HealthUpdate
func (*Listener) StatusC ¶
func (l *Listener) StatusC() chan StatusUpdate
type ListenerOption ¶
type ListenerOption func(*ListenerOptions)
func WithAlertProvider ¶ added in v0.6.0
func WithAlertProvider(alertProvider *alerting.Provider) ListenerOption
func WithAlertToggle ¶ added in v0.6.0
func WithAlertToggle() ListenerOption
func WithDefaultAlertCondition ¶ added in v0.6.0
func WithDefaultAlertCondition() ListenerOption
func WithDisconnectTimeout ¶ added in v0.6.0
func WithDisconnectTimeout(timeout time.Duration) ListenerOption
func WithMaxConnections ¶
func WithMaxConnections(max int64) ListenerOption
Max concurrent connections. Defaults to math.MaxInt64
func WithMaxJitter ¶
func WithMaxJitter(duration time.Duration) ListenerOption
func WithPollInterval ¶
func WithPollInterval(interval time.Duration) ListenerOption
func WithUpdateQueueCap ¶
func WithUpdateQueueCap(cap int) ListenerOption
Max concurrent queued updates before blocking. Defaults to 1000
type ListenerOptions ¶
type ListenerOptions struct {
// contains filtered or unexported fields
}
type Monitor ¶
type Monitor struct { MonitorOptions // contains filtered or unexported fields }
func NewMonitor ¶
func NewMonitor(opts ...MonitorOption) *Monitor
func (*Monitor) GetHealthStatus ¶
func (m *Monitor) GetHealthStatus(id string) *corev1.HealthStatus
func (*Monitor) WatchHealthStatus ¶ added in v0.6.0
type MonitorOption ¶
type MonitorOption func(*MonitorOptions)
func WithLogger ¶
func WithLogger(lg *zap.SugaredLogger) MonitorOption
type MonitorOptions ¶
type MonitorOptions struct {
// contains filtered or unexported fields
}
type StatusUpdate ¶
Click to show internal directories.
Click to hide internal directories.