peerresolver

package
v0.0.0-...-b27bbda Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBalancer

func GetBalancer(policy fab.EventServicePolicy) lbp.LoadBalancePolicy

GetBalancer returns the configured load balancer

Types

type Provider

type Provider func(ed service.Dispatcher, context context.Client, channelID string, opts ...options.Opt) Resolver

Provider creates a peer Resolver

type Resolver

type Resolver interface {
	// Resolve chooses a peer from the given set of peers
	Resolve(peers []fab.Peer) (fab.Peer, error)
	// ShouldDisconnect returns true to disconnect from the connected peer
	ShouldDisconnect(peers []fab.Peer, connectedPeer fab.Peer) bool
}

Resolver decided which peer to connect to and when to disconnect from that peer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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