Documentation ¶
Index ¶
- type OutgoingChannelLoadBalancer
- func (oplb *OutgoingChannelLoadBalancer) AddChannel(channel string) error
- func (oplb *OutgoingChannelLoadBalancer) Close() error
- func (oplb *OutgoingChannelLoadBalancer) CollectOneElementFromChannels() *p2p.SendableData
- func (oplb *OutgoingChannelLoadBalancer) GetChannelOrDefault(channel string) chan *p2p.SendableData
- func (oplb *OutgoingChannelLoadBalancer) IsInterfaceNil() bool
- func (oplb *OutgoingChannelLoadBalancer) RemoveChannel(channel string) error
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
Click to show internal directories.
Click to hide internal directories.