ratelimitter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupVisitors

func CleanupVisitors()

CleanupVisitors Every minute check the map for visitors that haven't been seen for more than 3 minutes and delete the entries.

func DeleteLimiter

func DeleteLimiter(server string)

DeleteLimiter for delete limitation of service

func Middleware

func Middleware(config map[string]interface{}) func(handler http.Handler) http.Handler

Middleware to check for the too many request every too many requests

func RegisterNewPlugin

func RegisterNewPlugin() (string, bool, map[string]interface{}, func(config map[string]interface{}) func(handler http.Handler) http.Handler)

RegisterNewPlugin for add this plugin to plugin center

func SetLimmiter

func SetLimmiter(server string, r rate.Limit, bursts int) *rate.Limiter

SetLimmiter to set new limit for server

Types

This section is empty.

Jump to

Keyboard shortcuts

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