Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransportWithDNSResponse ¶
func TransportWithDNSResponse(overrides map[string]string) http.RoundTripper
TransportWithDNSResponse creates a new transport which overrides hostnames.
Types ¶
type HealthRequest ¶
type HealthRequest struct {
Host, Path, Address string
Protocol v1alpha1.HealthProtocol
Port int
AdditionalHeaders v1alpha1.AdditionalHeaders
ExpectedResponses []int
AllowInsecureCertificate bool
Notifier ProbeNotifier
}
type InstrumentedProbeNotifier ¶
type InstrumentedProbeNotifier struct {
// contains filtered or unexported fields
}
InstrumentedProbeNotifier wraps a notifier by incrementing the failure counter when the result is unhealthy
func NewInstrumentedProbeNotifier ¶
func NewInstrumentedProbeNotifier(gatewayName, gatewayNamespace, listener string, notifier ProbeNotifier) *InstrumentedProbeNotifier
func (*InstrumentedProbeNotifier) Notify ¶
func (n *InstrumentedProbeNotifier) Notify(ctx context.Context, result ProbeResult) (NotificationResult, error)
type Monitor ¶
type Monitor struct { ProbeQueuers []*ProbeQueuer // contains filtered or unexported fields }
func NewMonitor ¶
func NewMonitor() *Monitor
func (*Monitor) AddProbeQueuer ¶
func (m *Monitor) AddProbeQueuer(probeQueuer *ProbeQueuer) bool
func (*Monitor) RemoveProbe ¶
func (*Monitor) UpdateProbe ¶
func (m *Monitor) UpdateProbe(id string, update func(*ProbeQueuer))
type NotificationResult ¶
type NotificationResult struct {
Requeue bool
}
type ProbeNotifier ¶
type ProbeNotifier interface {
Notify(ctx context.Context, result ProbeResult) (NotificationResult, error)
}
type ProbeQueuer ¶
type ProbeQueuer struct { ID string Interval time.Duration Protocol v1alpha1.HealthProtocol Path string IPAddress string Host string Port int AdditionalHeaders v1alpha1.AdditionalHeaders ExpectedResponses []int AllowInsecureCertificate bool Notifier ProbeNotifier Queue *QueuedProbeWorker // contains filtered or unexported fields }
func (*ProbeQueuer) Start ¶
func (p *ProbeQueuer) Start()
func (*ProbeQueuer) Stop ¶
func (p *ProbeQueuer) Stop()
type ProbeResult ¶
type QueuedProbeWorker ¶
QueuedProbeWorker funnels incoming health check requests from health probes, processing them one at a time and spacing them by a specified duration
func NewRequestQueue ¶
func NewRequestQueue(throttle time.Duration) *QueuedProbeWorker
func (*QueuedProbeWorker) EnqueueCheck ¶
func (q *QueuedProbeWorker) EnqueueCheck(req HealthRequest)
type StatusUpdateProbeNotifier ¶
type StatusUpdateProbeNotifier struct {
// contains filtered or unexported fields
}
func NewStatusUpdateProbeNotifier ¶
func NewStatusUpdateProbeNotifier(apiClient client.Client, forObj *v1alpha1.DNSHealthCheckProbe) StatusUpdateProbeNotifier
func (StatusUpdateProbeNotifier) Notify ¶
func (n StatusUpdateProbeNotifier) Notify(ctx context.Context, result ProbeResult) (NotificationResult, error)
Click to show internal directories.
Click to hide internal directories.