juju

package
v0.0.0-...-2537f40 Latest Latest
Warning

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

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

Documentation

Overview

Package juju provides a set of rate-limit proxy and router middlewares using the github.com/juju/ratelimit lib

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLimiterStore

func NewLimiterStore(maxRate float64, capacity int64, backend srate.Backend) srate.LimiterStore

func NewMemoryStore

func NewMemoryStore(maxRate float64, capacity int64) srate.LimiterStore

Types

type Limiter

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

func NewLimiter

func NewLimiter(maxRate float64, capacity int64) Limiter

func (Limiter) Allow

func (l Limiter) Allow() bool

Directories

Path Synopsis
Package proxy provides a rate-limit proxy middleware using the github.com/juju/ratelimit lib
Package proxy provides a rate-limit proxy middleware using the github.com/juju/ratelimit lib
Package router provides several rate-limit routers using the github.com/juju/ratelimit lib.
Package router provides several rate-limit routers using the github.com/juju/ratelimit lib.
gin

Jump to

Keyboard shortcuts

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