bucket

package
v0.0.0-...-a30b172 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(
	client *redis.Client,
	keySuffix string,
	decay time.Duration,
) ([]redis.Z, error)

Add adds an item to a leaky bucket, and returns the amount of items in the leaky bucket

func AddWithValue

func AddWithValue(
	client *redis.Client,
	keySuffix string,
	value interface{},
	decay time.Duration,
) ([]redis.Z, error)

Add adds an item with a specific value to a leaky bucket, and returns the amount of items in the leaky bucket

func Reset

func Reset(
	client *redis.Client,
	keySuffix string,
) error

Reset resets the given leaky bucket

Types

This section is empty.

Jump to

Keyboard shortcuts

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