...

Package dynamicselection

import "github.com/hyperledger/fabric-sdk-go/pkg/client/common/selection/dynamicselection"
Overview
Index
Subdirectories

Overview ▾

type CCPolicyProvider

CCPolicyProvider retrieves policy for the given chaincode ID

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

type Opt

Opt applies a selection provider option

type Opt func(*SelectionService)

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

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

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

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

Subdirectories

Name Synopsis
..
pgresolver