Documentation ¶
Index ¶
- type CommittedTimeoutForIp
- type Recast
- type Telemetry
- func (t *Telemetry) GetWastedTime() float64
- func (t *Telemetry) StartMetricsServer()
- func (t *Telemetry) StartPushGateway()
- func (t *Telemetry) Stop() error
- func (t *Telemetry) StopMetricsServer() error
- func (t *Telemetry) StopPushGateway() error
- func (t *Telemetry) TrackGeneratedSecrets(generatedSecrets int)
- func (t *Telemetry) TrackWastedTime(wastedTime time.Duration)
- type TelemetryInput
- type TimeoutForIp
- func (t *TimeoutForIp) CalculateNextTimeout() time.Duration
- func (t *TimeoutForIp) GetAverageTimeoutInSample() time.Duration
- func (t *TimeoutForIp) GetNextTimeout() time.Duration
- func (t *TimeoutForIp) GetStandardDeviation() time.Duration
- func (t *TimeoutForIp) RecordInvalidTimeout(timeout time.Duration)
- func (t *TimeoutForIp) RecordValidTimeout(timeout time.Duration)
- type TimeoutWatcher
- func (tw *TimeoutWatcher) BroadcastColdCacheIp(identifier string, timeout time.Duration)
- func (tw *TimeoutWatcher) CommitToColdCache(identifier string, timeout time.Duration)
- func (tw *TimeoutWatcher) CommitToColdCacheWithBroadcast(identifier string, timeout time.Duration)
- func (tw *TimeoutWatcher) GetTimeout(identifier string) time.Duration
- func (tw *TimeoutWatcher) HasColdCacheTimeout(identifier string) bool
- func (tw *TimeoutWatcher) RecordResponse(identifier string, timeout time.Duration, successful bool)
- func (tw *TimeoutWatcher) SetActionDispatcher(actionDispatcher action.IBroadcastActionDispatcher)
- type TimeoutWatcherOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommittedTimeoutForIp ¶
Timeout for an IP address we have been able to work out who's timeout is
type Recast ¶
type Recast struct {
// contains filtered or unexported fields
}
This struct monitors the amount of time wasted by the node and determines if it should try to shutdown the node and "recast" to get a new IP address
func (*Recast) StartChecking ¶
func (r *Recast) StartChecking()
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
func (*Telemetry) GetWastedTime ¶
func (*Telemetry) StartMetricsServer ¶
func (t *Telemetry) StartMetricsServer()
func (*Telemetry) StartPushGateway ¶
func (t *Telemetry) StartPushGateway()
func (*Telemetry) StopMetricsServer ¶
func (*Telemetry) StopPushGateway ¶
func (*Telemetry) TrackGeneratedSecrets ¶
func (*Telemetry) TrackWastedTime ¶
type TelemetryInput ¶
type TelemetryInput struct {
NodeName string
}
type TimeoutForIp ¶
type TimeoutForIp struct { // The number of requests that have been made by an given IP to this node Requests int // The duration of the last N timeouts that finished successfully ValidTimeouts []time.Duration // The duration of the last N timeouts that finished with a client timeout InvalidTimeouts []time.Duration // The duration of the last valid timeout LastValidTimeout time.Duration // The duration of the last invalid timeout LastInvalidTimeout time.Duration // The duration of the last timeout that was attempted LastPerformedTimeout time.Duration // contains filtered or unexported fields }
Struct representing the traffic for a given IP address
func NewTimeoutForIp ¶
func NewTimeoutForIp(opts *TimeoutWatcherOptions) *TimeoutForIp
func (*TimeoutForIp) CalculateNextTimeout ¶
func (t *TimeoutForIp) CalculateNextTimeout() time.Duration
func (*TimeoutForIp) GetAverageTimeoutInSample ¶
func (t *TimeoutForIp) GetAverageTimeoutInSample() time.Duration
func (*TimeoutForIp) GetNextTimeout ¶
func (t *TimeoutForIp) GetNextTimeout() time.Duration
func (*TimeoutForIp) GetStandardDeviation ¶
func (t *TimeoutForIp) GetStandardDeviation() time.Duration
func (*TimeoutForIp) RecordInvalidTimeout ¶
func (t *TimeoutForIp) RecordInvalidTimeout(timeout time.Duration)
func (*TimeoutForIp) RecordValidTimeout ¶
func (t *TimeoutForIp) RecordValidTimeout(timeout time.Duration)
type TimeoutWatcher ¶
type TimeoutWatcher struct {
// contains filtered or unexported fields
}
func NewTimeoutWatcher ¶
func NewTimeoutWatcher(config *config.Config) *TimeoutWatcher
func (*TimeoutWatcher) BroadcastColdCacheIp ¶
func (tw *TimeoutWatcher) BroadcastColdCacheIp(identifier string, timeout time.Duration)
func (*TimeoutWatcher) CommitToColdCache ¶
func (tw *TimeoutWatcher) CommitToColdCache(identifier string, timeout time.Duration)
func (*TimeoutWatcher) CommitToColdCacheWithBroadcast ¶
func (tw *TimeoutWatcher) CommitToColdCacheWithBroadcast(identifier string, timeout time.Duration)
func (*TimeoutWatcher) GetTimeout ¶
func (tw *TimeoutWatcher) GetTimeout(identifier string) time.Duration
func (*TimeoutWatcher) HasColdCacheTimeout ¶
func (tw *TimeoutWatcher) HasColdCacheTimeout(identifier string) bool
func (*TimeoutWatcher) RecordResponse ¶
func (tw *TimeoutWatcher) RecordResponse(identifier string, timeout time.Duration, successful bool)
func (*TimeoutWatcher) SetActionDispatcher ¶
func (tw *TimeoutWatcher) SetActionDispatcher(actionDispatcher action.IBroadcastActionDispatcher)
type TimeoutWatcherOptions ¶
type TimeoutWatcherOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.