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)