redisqueue

package
v0.0.57 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

func Enqueue

func Enqueue(payload []byte)

func EnqueueUsage added in v0.0.7

func EnqueueUsage(payload []byte, requestedAt time.Time)

func FlushUsage added in v0.0.47

func FlushUsage(ctx context.Context)

FlushUsage forces any buffered usage rows to the durable store. Called on service shutdown so the loss window does not stretch past process exit.

func PopOldest

func PopOldest(count int) [][]byte

func PrunePersistentUsage added in v0.0.7

func PrunePersistentUsage()

func SetEnabled

func SetEnabled(value bool)

func SetRetentionSeconds

func SetRetentionSeconds(value int)

func SetUsageStatisticsEnabled

func SetUsageStatisticsEnabled(enabled bool)

SetUsageStatisticsEnabled toggles whether usage records are enqueued into the redisqueue payload buffer. This is controlled by the config field `usage-statistics-enabled` and the corresponding management API.

func SetUsageStore added in v0.0.7

func SetUsageStore(store UsageStore)

func SubscribeUsage

func SubscribeUsage() (<-chan []byte, func())

func UsageStatisticsEnabled

func UsageStatisticsEnabled() bool

UsageStatisticsEnabled reports whether the usage queue plugin should publish records.

Types

type UsageStore added in v0.0.7

type UsageStore interface {
	AppendUsage(ctx context.Context, payload []byte, requestedAt time.Time) error
	PopUsage(ctx context.Context, count int) ([][]byte, error)
	PruneUsage(ctx context.Context, retention time.Duration) error
}

Jump to

Keyboard shortcuts

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