multilimiter

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiStore

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

MultiStore is a type for multiple limiter.Store

func New

func New(configs []*memorystore.Config) (*MultiStore, error)

New creates a new *MultiStore

func NewDefaultMultiStore

func NewDefaultMultiStore() (*MultiStore, error)

NewDefaultMultiStore creates a *MultiStore with the default internals

func (*MultiStore) Take

func (m *MultiStore) Take(ctx context.Context, key string) (ok bool, reset time.Time, firstFail bool, err error)

Take implements the limiter.Store interface

Jump to

Keyboard shortcuts

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