istio: Index | Files

package rate

import ""


Package Files


type Limit Uses

type Limit interface {
    Wait(ctx context.Context) (err error)

Limit is partially representing standard lib's rate limiter

type LimitFactory Uses

type LimitFactory interface {
    Create() Limit

LimitFactory is an interface for creating per-connection rate limiters

type Limiter Uses

type Limiter struct {
    // contains filtered or unexported fields

Limiter is wrapper around golang's rate.Limit for more balanced rate limiting among multiple connections

func NewRateLimiter Uses

func NewRateLimiter(freq time.Duration, burstSize int) *Limiter

NewRateLimiter returns a new Limiter

func (*Limiter) Create Uses

func (c *Limiter) Create() Limit

Create returns a new standard lib's rate limiter for each connectin with a given frequency and burstSize

Package rate imports 3 packages (graph) and is imported by 12 packages. Updated 2019-03-29. Refresh now. Tools for package owners.