Help us shape the future of Go! Take the 2026 Go Developer Survey

stats

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package stats provides statistics collection for the gokue job queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector tracks queue activity without taking locks on the hot path using atomic operations.

func NewCollector

func NewCollector() *Collector

NewCollector creates and returns a new Collector initialized with zero values.

func (*Collector) IncDropped

func (c *Collector) IncDropped()

IncDropped increments the dropped counter.

func (*Collector) IncEnqueued

func (c *Collector) IncEnqueued()

IncEnqueued increments the enqueued counter.

func (*Collector) IncFailed

func (c *Collector) IncFailed()

IncFailed increments the failed counter.

func (*Collector) IncProcessed

func (c *Collector) IncProcessed()

IncProcessed increments the processed counter.

func (*Collector) IncRetried

func (c *Collector) IncRetried()

IncRetried increments the retried counter.

func (*Collector) IncRetryPredicatesFailed

func (c *Collector) IncRetryPredicatesFailed()

IncRetryPredicatesFailed increments the retryPredicatesFailed counter

func (*Collector) Snapshot

func (c *Collector) Snapshot() Snapshot

Snapshot returns a snapshot of the current statistics.

type Snapshot

type Snapshot struct {
	// Enqueued is the total number of jobs enqueued.
	Enqueued uint64
	// Processed is the total number of jobs successfully processed.
	Processed uint64
	// Failed is the total number of jobs that failed after all retries.
	Failed uint64
	// Retried is the total number of job retry attempts.
	Retried uint64
	// Dropped is the total number of jobs dropped.
	Dropped uint64
	// RetryPredicatesFailed is the total number of job that failed a retry predicate function.
	RetryPredicatesFailed uint64
}

Snapshot represents a point-in-time capture of queue statistics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL