proxy

package
v0.0.0-...-9823ec8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package proxy provides a rate-limit proxy middleware using the github.com/juju/ratelimit lib

Index

Constants

View Source
const Namespace = "github.com/starvn/sonic/qos/ratelimit/juju/proxy"

Variables

View Source
var ZeroCfg = Config{}

Functions

func BackendFactory

func BackendFactory(next proxy.BackendFactory) proxy.BackendFactory

func ConfigGetter

func ConfigGetter(e config.ExtraConfig) interface{}

func NewMiddleware

func NewMiddleware(remote *config.Backend) proxy.Middleware

Types

type Config

type Config struct {
	MaxRate  float64
	Capacity int64
}

Jump to

Keyboard shortcuts

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