frlimit

package module
v0.0.0-...-7bb3cb6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 2 Imported by: 0

README

frlimit

A golang library for frequency limit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Get(ctx context.Context, key string) (int, error)
	Set(ctx context.Context, key string, value int) error
	Incr(ctx context.Context, key string) (int, error)
	Del(ctx context.Context, key string) error
}

type Limiter

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

func New

func New(adapter *Adapter) *Limiter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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