redis

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Prefix string
}

type Store

type Store struct {
	Options
	redis.Client
}

func New

func New(db string, opts ...Options) (*Store, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, rate *limiter.Rate, key string) (res limiter.Resource, err error)

func (*Store) Peek

func (s *Store) Peek(ctx context.Context, rate *limiter.Rate, key string) (res limiter.Resource, err error)

Jump to

Keyboard shortcuts

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