fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/peerresolver/balanced Index | Files

package balanced

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/peerresolver/balanced"


Package Files

balanced.go opts.go

func NewResolver Uses

func NewResolver() peerresolver.Provider

NewResolver returns a new "balanced" peer resolver provider.

type PeerResolver Uses

type PeerResolver struct {
    // contains filtered or unexported fields

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

func New Uses

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

New returns a new "balanced" peer resolver.

func (*PeerResolver) Resolve Uses

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

Resolve returns a peer usig the configured load balancer.

func (PeerResolver) SetLoadBalancePolicy Uses

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

func (*PeerResolver) ShouldDisconnect Uses

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

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

Package balanced imports 7 packages (graph) and is imported by 1 packages. Updated 2018-11-02. Refresh now. Tools for package owners.