Versions in this module Expand all Collapse all v1 v1.4.10 Dec 9, 2020 Changes in this version + var ErrNotFound = errors.New("not found") + var NoExclusion = selectionFunc(noExclusion) + var NoFilter = NewFilter(NoPriorities, NoExclusion) + var NoPriorities = &noPriorities + var PrioritiesByHeight = &byHeight + type ChannelResponse interface + Config func() (*discovery.ConfigResult, error) + Endorsers func(invocationChain InvocationChain, f Filter) (Endorsers, error) + Peers func(invocationChain ...*discovery.ChaincodeCall) ([]*Peer, error) + type Client struct + func NewClient(createConnection Dialer, s Signer, signerCacheSize uint) *Client + func (c *Client) Send(ctx context.Context, req *Request, auth *discovery.AuthInfo) (Response, error) + type Dialer func() (*grpc.ClientConn, error) + type Endorsers []*Peer + func (endorsers Endorsers) Filter(f ExclusionFilter) Endorsers + func (endorsers Endorsers) Shuffle() Endorsers + func (endorsers Endorsers) Sort(ps PrioritySelector) Endorsers + type ExclusionFilter interface + Exclude func(Peer) bool + func ExcludeByHost(reject func(host string) bool) ExclusionFilter + func ExcludeHosts(endpoints ...string) ExclusionFilter + type Filter interface + Filter func(endorsers Endorsers) Endorsers + func NewFilter(ps PrioritySelector, ef ExclusionFilter) Filter + type InvocationChain []*discovery.ChaincodeCall + func (ic InvocationChain) String() string + func (ic InvocationChain) ValidateInvocationChain() error + type LocalResponse interface + Peers func() ([]*Peer, error) + type MemoizeSigner struct + func NewMemoizeSigner(signFunc Signer, maxEntries uint) *MemoizeSigner + func (ms *MemoizeSigner) Sign(msg []byte) ([]byte, error) + type Peer struct + AliveMessage *gossip.SignedGossipMessage + Identity []byte + MSPID string + StateInfoMessage *gossip.SignedGossipMessage + type Priority int + type PrioritySelector interface + Compare func(Peer, Peer) Priority + type Request struct + func NewRequest() *Request + func (req *Request) AddConfigQuery() *Request + func (req *Request) AddEndorsersQuery(interests ...*discovery.ChaincodeInterest) (*Request, error) + func (req *Request) AddLocalPeersQuery() *Request + func (req *Request) AddPeersQuery(invocationChain ...*discovery.ChaincodeCall) *Request + func (req *Request) OfChannel(ch string) *Request + type Response interface + ForChannel func(string) ChannelResponse + ForLocal func() LocalResponse + type Signer func(msg []byte) ([]byte, error)