import "github.com/hyperledger/fabric-sdk-go/pkg/client/common/selection/fabricselection"
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(value fab.ErrorHandler) coptions.Opt
WithErrorHandler sets the error handler
WithRefreshInterval sets the interval in which the peer cache is refreshed
WithResponseTimeout sets the Discover service response timeout
WithRetryOpts sets retry options for retries on transient errors from the Discovery Server
type DiscoveryClient interface { Send(ctx context.Context, req *fabdiscovery.Request, targets ...fab.PeerConfig) (<-chan fabdiscovery.Response, error) }
DiscoveryClient is the client to the discovery service
type DiscoveryError struct {
// contains filtered or unexported fields
}
DiscoveryError is an error originating at the Discovery service
func (e DiscoveryError) IsAccessDenied() bool
IsAccessDenied checks if response contains access denied msg
func (e DiscoveryError) IsTransient() bool
IsTransient checks if error is about peer being unable to ding chaincode or endorsement combination wasn't satisfied
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(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
Close closes all resources associated with the service
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 25 packages (graph) and is imported by 1 packages. Updated 2020-12-24. Refresh now. Tools for package owners.