net

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 38 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

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

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

NewThrottler creates a new Throttler

func (*Throttler) Run

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

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

func (*Throttler) Try

func (t *Throttler) Try(ctx context.Context, revID types.NamespacedName, 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