handler

package
v0.0.0-...-432d548 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QPSLimiteHandler

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

QPSLimiteHandler a http handler which can limits qps

func NewQPSLimiteHandler

func NewQPSLimiteHandler(maxQPS int32) *QPSLimiteHandler

NewQPSLimiteHandler creates a new handler.

func (*QPSLimiteHandler) HandleFunc

func (ql *QPSLimiteHandler) HandleFunc(errHandler func(w http.ResponseWriter, r *http.Request),
	target func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)

HandleFunc creates a http handler

Jump to

Keyboard shortcuts

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