balancer

package
v0.2.15-metrics Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreferPeerBalancer

type PreferPeerBalancer struct {
	lbp.LoadBalancePolicy
	// contains filtered or unexported fields
}

PreferPeerBalancer is a balancer that chooses the provided peer if it's in the provided list of peers, otherwise it load balances the peers.

func NewPreferPeer

func NewPreferPeer(peerURL string, balancer lbp.LoadBalancePolicy) *PreferPeerBalancer

NewPreferPeer creates a balancer that chooses the provided peer if it's in the provided list of peers, otherwise it load balances the peers.

func (*PreferPeerBalancer) Choose

func (b *PreferPeerBalancer) Choose(peers []fab.Peer) (fab.Peer, error)

Choose chooses from the list of peers using the provided balancer but prefers the local peer if it's in the list

Jump to

Keyboard shortcuts

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