dynamicselection

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 20 Imported by: 26 modules, 26 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCPolicyProvider

type CCPolicyProvider interface {
	GetChaincodePolicy(chaincodeID string) (*common.SignaturePolicyEnvelope, error)
}

CCPolicyProvider retrieves policy for the given chaincode ID

type Opt

type Opt func(*SelectionService)

Opt applies a selection provider option

func WithCacheTimeout

func WithCacheTimeout(timeout time.Duration) Opt

WithCacheTimeout sets the expiration timeout of the cache

func WithLoadBalancePolicy

func WithLoadBalancePolicy(lbp pgresolver.LoadBalancePolicy) Opt

WithLoadBalancePolicy sets the load-balance policy

type SelectionService

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

SelectionService chooses endorsing peers for a given set of chaincodes using their chaincode policy

func NewService

func NewService(context context.Client, channelID string, discovery fab.DiscoveryService, opts ...Opt) (*SelectionService, error)

NewService creates a new dynamic selection service

func (*SelectionService) Close

func (s *SelectionService) Close()

Close closes all resources associated with the service

func (*SelectionService) GetEndorsersForChaincode

func (s *SelectionService) GetEndorsersForChaincode(chaincodes []*fab.ChaincodeCall, opts ...copts.Opt) ([]fab.Peer, error)

GetEndorsersForChaincode returns the endorsing peers for the given chaincodes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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