balanced

package
v1.0.0-beta33 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResolver

func NewResolver() peerresolver.Provider

NewResolver returns a new "balanced" peer resolver provider.

Types

type PeerResolver

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

PeerResolver is a peer resolver that chooses peers using the provided load balancer.

func New

func New(dispatcher service.Dispatcher, context context.Client, channelID string, opts ...options.Opt) *PeerResolver

New returns a new "balanced" peer resolver.

func (*PeerResolver) Resolve

func (r *PeerResolver) Resolve(peers []fab.Peer) (fab.Peer, error)

Resolve returns a peer usig the configured load balancer.

func (PeerResolver) SetLoadBalancePolicy

func (p PeerResolver) SetLoadBalancePolicy(value lbp.LoadBalancePolicy)

func (*PeerResolver) ShouldDisconnect

func (r *PeerResolver) ShouldDisconnect(peers []fab.Peer, connectedPeer fab.Peer) bool

ShouldDisconnect always returns false (will not disconnect a connected peer)

Jump to

Keyboard shortcuts

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