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

package fabricselection

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


Package Files

cachekey.go fabricselection.go opts.go selectionfilter.go


const (

    // AccessDenied indicates that the user does not have permission to perform the operation
    AccessDenied = "access denied"

func WithErrorHandler Uses

func WithErrorHandler(value fab.ErrorHandler) coptions.Opt

WithErrorHandler sets the error handler

func WithRefreshInterval Uses

func WithRefreshInterval(value time.Duration) coptions.Opt

WithRefreshInterval sets the interval in which the peer cache is refreshed

func WithResponseTimeout Uses

func WithResponseTimeout(value time.Duration) coptions.Opt

WithResponseTimeout sets the Discover service response timeout

func WithRetryOpts Uses

func WithRetryOpts(value retry.Opts) coptions.Opt

WithRetryOpts sets retry options for retries on transient errors from the Discovery Server

type DiscoveryClient Uses

type DiscoveryClient interface {
    Send(ctx context.Context, req *fabdiscovery.Request, targets ...fab.PeerConfig) ([]fabdiscovery.Response, error)

DiscoveryClient is the client to the discovery service

type DiscoveryError Uses

type DiscoveryError string

DiscoveryError is an error originating at the Discovery service

func (DiscoveryError) Error Uses

func (e DiscoveryError) Error() string

Error returns the error message

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service chooses endorsing peers for a given set of chaincodes using Fabric's Discovery Service

func New Uses

func New(ctx contextAPI.Client, channelID string, discovery fab.DiscoveryService, opts ...coptions.Opt) (*Service, error)

New creates a new dynamic selection service using Fabric's Discovery Service

func (*Service) Close Uses

func (s *Service) Close()

Close closes all resources associated with the service

func (*Service) GetEndorsersForChaincode Uses

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

GetEndorsersForChaincode returns the endorsing peers for the given chaincodes

Package fabricselection imports 26 packages (graph) and is imported by 1 packages. Updated 2019-10-17. Refresh now. Tools for package owners.