proxy

package
v0.0.0-...-833ad8d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketHeaderKey ...
	BucketHeaderKey = "x-ratelimit-bucket"
	// HostHeaderKey ...
	HostHeaderKey = "x-ratelimit-host"
	// SchemeHeaderKey ...
	SchemeHeaderKey = "x-ratelimit-scheme"
)

Variables

This section is empty.

Functions

func NewTransport

func NewTransport(manager *ratelimit.Manager) http.RoundTripper

NewTransport ...

Types

type Server

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

Server ...

func New

func New(o ServerOptions) *Server

New ...

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ServerOptions

type ServerOptions struct {
	Burst int
	Rate  float64
	Queue int
}

ServerOptions ...

Jump to

Keyboard shortcuts

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