middleware

package
v1.0.117 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMaxNumRequests = errors.New("max number of requests value is invalid")

ErrInvalidMaxNumRequests signals that a provided number of requests is invalid

Functions

func NewGlobalThrottler

func NewGlobalThrottler(maxConnections uint32) (*globalThrottler, error)

NewGlobalThrottler creates a new instance of a globalThrottler

func NewSourceThrottler

func NewSourceThrottler(maxNumRequests uint32) (*sourceThrottler, error)

NewSourceThrottler creates a new instance of a sourceThrottler

func WithElrondFacade

func WithElrondFacade(elrondFacade ElrondHandler) gin.HandlerFunc

WithElrondFacade middleware will set up an ElrondFacade object in the gin context

Types

type ElrondHandler

type ElrondHandler interface {
}

ElrondHandler interface defines methods that can be used from `elrondFacade` context variable

Jump to

Keyboard shortcuts

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