Documentation ¶
Overview ¶
Package quaistats implements the network stats reporting service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthResponse ¶
type BatchObject ¶ added in v0.25.0
type Credentials ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements an Quai netstats reporting daemon that pushes local chain statistics up to a monitoring server.
type StatsQueue ¶ added in v0.25.0
type StatsQueue struct {
// contains filtered or unexported fields
}
StatsQueue is a thread-safe queue designed for managing and processing stats data.
The primary objective of the StatsQueue is to provide a safe mechanism for enqueuing, dequeuing, and requeuing stats objects concurrently across multiple goroutines.
Key Features:
- Enqueue: Allows adding an item to the end of the queue.
- Dequeue: Removes and returns the item from the front of the queue.
- RequeueFront: Adds an item back to the front of the queue, useful for failed processing attempts.
Concurrent Access:
- The internal state of the queue is protected by a mutex to prevent data races and ensure that the operations are atomic. As a result, it's safe to use across multiple goroutines without external synchronization.
func NewStatsQueue ¶ added in v0.25.0
func NewStatsQueue() *StatsQueue
func (*StatsQueue) Dequeue ¶ added in v0.25.0
func (q *StatsQueue) Dequeue() interface{}
func (*StatsQueue) Enqueue ¶ added in v0.25.0
func (q *StatsQueue) Enqueue(item interface{})
func (*StatsQueue) EnqueueFront ¶ added in v0.25.0
func (q *StatsQueue) EnqueueFront(item interface{})
func (*StatsQueue) EnqueueFrontBatch ¶ added in v0.27.0
func (q *StatsQueue) EnqueueFrontBatch(items []interface{})
func (*StatsQueue) Size ¶ added in v0.25.0
func (q *StatsQueue) Size() int
Click to show internal directories.
Click to hide internal directories.