proxy

package
v0.0.0-...-3e3a7b6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(url, key string) bool

func NewHandler

func NewHandler(service *Service) http.Handler

Types

type Limits

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

func NewLimits

func NewLimits() *Limits

func (*Limits) Add

func (p *Limits) Add(key string, qps int) *Limits

func (*Limits) Check

func (p *Limits) Check(url string) error

type Service

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

Service is proxy service.

func NewService

func NewService(cfg *pb.Config, limits *Limits) *Service

NewService creates a new instance of Service.

func (*Service) Execute

func (p *Service) Execute(pbreq *pb.Request, num int) *pb.Response

func (*Service) Handler

func (p *Service) Handler() http.Handler

Jump to

Keyboard shortcuts

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