net

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package net contains the Activator components that govern Activator's request throttling, routing, and reflect the cluster network state.

Index

Constants

This section is empty.

Variables

View Source
var ErrActivatorOverload = errors.New("activator overload")

Functions

This section is empty.

Types

type Throttler added in v0.9.0

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

Throttler load balances requests to revisions based on capacity. When `Run` is called it listens for updates to revision backends and decides when and when and where to forward a request.

func NewThrottler added in v0.9.0

func NewThrottler(ctx context.Context,
	breakerParams queue.BreakerParams,
	ipAddr string) *Throttler

NewThrottler creates a new Throttler

func (*Throttler) Run added in v0.9.0

func (t *Throttler) Run(ctx context.Context)

Run starts the throttler and blocks until the context is done.

func (*Throttler) Try added in v0.9.0

func (t *Throttler) Try(ctx context.Context, function func(string) error) error

Try waits for capacity and then executes function, passing in a l4 dest to send a request

Jump to

Keyboard shortcuts

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