jsq

package
v0.0.0-...-f944a7c Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JoinShortestQueueBalancer

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

JoinShortestQueueBalancer is a bookkeeping struct

func NewJoinShortestQueueBalancer

func NewJoinShortestQueueBalancer(balancees []url.URL, options JoinShortestQueueBalancerOptions, next http.Handler) *JoinShortestQueueBalancer

NewJoinShortestQueueBalancer gives a new ChoiceOfBalancer back

func (*JoinShortestQueueBalancer) Add

Add a url to the loadbalancer

func (*JoinShortestQueueBalancer) HighWatermark

func (b *JoinShortestQueueBalancer) HighWatermark(u *url.URL) int

HighWatermark returns the most outstanding requests for a particular balancee

func (*JoinShortestQueueBalancer) NumberOfBalancees

func (b *JoinShortestQueueBalancer) NumberOfBalancees() int

NumberOfBalancees returns the number of balancees that this balancer knows about

func (*JoinShortestQueueBalancer) OutstandingRequests

func (b *JoinShortestQueueBalancer) OutstandingRequests(u *url.URL) int

OutstandingRequests returns the number of outstanding requests for a particular balancee

func (*JoinShortestQueueBalancer) Remove

func (b *JoinShortestQueueBalancer) Remove(u *url.URL) error

Remove a url from the loadbalancer.

func (*JoinShortestQueueBalancer) RequestCount

func (b *JoinShortestQueueBalancer) RequestCount(u *url.URL) int

RequestCount gives back the number of requests that have come into a particular URL

func (*JoinShortestQueueBalancer) ServeHTTP

type JoinShortestQueueBalancerOptions

type JoinShortestQueueBalancerOptions struct {
	IsTesting bool
}

Jump to

Keyboard shortcuts

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