limiter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDeviceId   = errors.New(http.StatusNotAcceptable, "***NOT ACCEPTABLE**", "fns: X-Fns-Device-Id is required")
	ErrNotAllowed = errors.New(http.StatusTooManyRequests, "***TOO MANY REQUESTS***", "fns: too many requests")
)

Functions

func New

func New() transports.Middleware

Types

type Config

type Config struct {
	Enable       bool `json:"enable"`
	EverySeconds int  `json:"everySeconds"`
	Burst        int  `json:"burst"`
	MaxDevice    int  `json:"maxDevice"`
}

Jump to

Keyboard shortcuts

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