Documentation ¶
Index ¶
- func StopMonitoring()
- type AggregatedQueueMetrics
- type Queue
- func (q *Queue) AggregatedDiscoveryQueueMetrics(period int) *AggregatedQueueMetrics
- func (q *Queue) Consume() inst.InstanceKey
- func (q *Queue) DiscoveryQueueMetrics(period int) []QueueMetric
- func (q *Queue) Push(key inst.InstanceKey)
- func (q *Queue) QueueLen() int
- func (q *Queue) Release(key inst.InstanceKey)
- type QueueMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AggregatedQueueMetrics ¶
type AggregatedQueueMetrics struct { ActiveMinEntries float64 ActiveMeanEntries float64 ActiveMedianEntries float64 ActiveP95Entries float64 ActiveMaxEntries float64 QueuedMinEntries float64 QueuedMeanEntries float64 QueuedMedianEntries float64 QueuedP95Entries float64 QueuedMaxEntries float64 }
AggregatedQueuedEntries contains aggregate information some part queue metrics
type Queue ¶
Queue contains information for managing discovery requests
func CreateOrReturnQueue ¶
CreateOrReturnQueue allows for creation of a new discovery queue or returning a pointer to an existing one given the name.
func (*Queue) AggregatedDiscoveryQueueMetrics ¶
func (q *Queue) AggregatedDiscoveryQueueMetrics(period int) *AggregatedQueueMetrics
AggregatedDiscoveryQueueMetrics Returns some aggregate statistics based on the period (last N entries) requested. We store up to config.Config.DiscoveryQueueMaxStatisticsSize values and collect once a second so we expect period to be a smaller value.
func (*Queue) Consume ¶
func (q *Queue) Consume() inst.InstanceKey
Consume fetches a key to process; blocks if queue is empty. Release must be called once after Consume.
func (*Queue) DiscoveryQueueMetrics ¶
func (q *Queue) DiscoveryQueueMetrics(period int) []QueueMetric
DiscoveryQueueMetrics returns some raw queue metrics based on the period (last N entries) requested.
func (*Queue) Push ¶
func (q *Queue) Push(key inst.InstanceKey)
Push enqueues a key if it is not on a queue and is not being processed; silently returns otherwise.
func (*Queue) Release ¶
func (q *Queue) Release(key inst.InstanceKey)
Release removes a key from a list of being processed keys which allows that key to be pushed into the queue again.
type QueueMetric ¶
QueueMetric contains the queue's active and queued sizes