fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/client/common/selection/dynamicselection Index | Files | Directories

package dynamicselection

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

Index

Package Files

ccpolicyprovider.go dynamicselection.go

type CCPolicyProvider Uses

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

CCPolicyProvider retrieves policy for the given chaincode ID

type Opt Uses

type Opt func(*SelectionService)

Opt applies a selection provider option

func WithCacheTimeout Uses

func WithCacheTimeout(timeout time.Duration) Opt

WithCacheTimeout sets the expiration timeout of the cache

func WithLoadBalancePolicy Uses

func WithLoadBalancePolicy(lbp pgresolver.LoadBalancePolicy) Opt

WithLoadBalancePolicy sets the load-balance policy

type SelectionService Uses

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

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

func NewService Uses

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

NewService creates a new dynamic selection service

func (*SelectionService) Close Uses

func (s *SelectionService) Close()

Close closes all resources associated with the service

func (*SelectionService) GetEndorsersForChaincode Uses

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

GetEndorsersForChaincode returns the endorsing peers for the given chaincodes

Directories

PathSynopsis
pgresolver

Package dynamicselection imports 20 packages (graph) and is imported by 1 packages. Updated 2019-08-24. Refresh now. Tools for package owners.