loadBalancer

package
v1.1.41 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutgoingChannelLoadBalancer

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

OutgoingChannelLoadBalancer is a component that evenly balances requests to be sent

func NewOutgoingChannelLoadBalancer

func NewOutgoingChannelLoadBalancer() *OutgoingChannelLoadBalancer

NewOutgoingChannelLoadBalancer creates a new instance of a ChannelLoadBalancer instance

func (*OutgoingChannelLoadBalancer) AddChannel

func (oplb *OutgoingChannelLoadBalancer) AddChannel(channel string) error

AddChannel adds a new channel to the throttler, if it does not exists

func (*OutgoingChannelLoadBalancer) Close added in v1.0.115

func (oplb *OutgoingChannelLoadBalancer) Close() error

Close finishes all started go routines in this instance

func (*OutgoingChannelLoadBalancer) CollectOneElementFromChannels

func (oplb *OutgoingChannelLoadBalancer) CollectOneElementFromChannels() *p2p.SendableData

CollectOneElementFromChannels gets the waiting object from mainChan. It is a blocking call.

func (*OutgoingChannelLoadBalancer) GetChannelOrDefault

func (oplb *OutgoingChannelLoadBalancer) GetChannelOrDefault(channel string) chan *p2p.SendableData

GetChannelOrDefault fetches the required channel or the default if the channel is not present

func (*OutgoingChannelLoadBalancer) IsInterfaceNil

func (oplb *OutgoingChannelLoadBalancer) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*OutgoingChannelLoadBalancer) RemoveChannel

func (oplb *OutgoingChannelLoadBalancer) RemoveChannel(channel string) error

RemoveChannel removes an existing channel from the throttler

Jump to

Keyboard shortcuts

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