repository

package
v0.0.0-...-5ed6c77 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKeyValid

func IsKeyValid(v *validator.Validator, key string)

Types

type KeyGeneratorRepository

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

func NewRepository

func NewRepository(client *redis.Client) *KeyGeneratorRepository

func (*KeyGeneratorRepository) FillKeys

func (r *KeyGeneratorRepository) FillKeys(threshold int64)

FillKeys ensures that unused_keys meets a minimum threshold.

func (*KeyGeneratorRepository) GetKey

GetKey retrieves a key from the unused_keys set and moves it to used_keys.

func (*KeyGeneratorRepository) ReallocateKey

func (r *KeyGeneratorRepository) ReallocateKey(key string) error

ReallocateKey moves a key back to the unused_keys set.

Jump to

Keyboard shortcuts

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