...

Package discovery

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/discovery"
Overview
Index
Subdirectories

Overview ▾

type Client

Client implements a Discovery client

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

func New

func New(ctx fabcontext.Client) (*Client, error)

New returns a new Discover client

func (*Client) Send

func (c *Client) Send(ctx context.Context, req *discclient.Request, targets ...fab.PeerConfig) ([]Response, error)

Send retrieves information about channel peers, endorsers, and MSP config from the given set of peers. A set of successful responses is returned and/or an error is returned from each of the peers that was unsuccessful (note that if more than one peer returned an error then the returned error may be cast to multi.Errors).

type Response

Response extends the response from the Discovery invocation on the peer by adding the endpoint URL of the peer that was invoked.

type Response interface {
    discclient.Response
    Target() string
}

Subdirectories

Name Synopsis
..
mocks