Documentation
¶
Index ¶
- func NewLazyGRPCClient(pc *GRPCClient) *lazyGRPCClient
- type CachingClientFactory
- type Client
- type ClientFactory
- type ClientWrapper
- func (c *ClientWrapper) Address() string
- func (c *ClientWrapper) Certificate() tls.Certificate
- func (c *ClientWrapper) Close()
- func (c *ClientWrapper) DeliverClient() (peer.DeliverClient, error)
- func (c *ClientWrapper) DiscoveryClient() (DiscoveryClient, error)
- func (c *ClientWrapper) EndorserClient() (peer.EndorserClient, error)
- func (c *ClientWrapper) OrdererClient() (ab.AtomicBroadcastClient, error)
- type DiscoveryClient
- type GRPCClient
- func (c *GRPCClient) Address() string
- func (c *GRPCClient) Certificate() tls.Certificate
- func (c *GRPCClient) Close()
- func (c *GRPCClient) DeliverClient() (pb.DeliverClient, error)
- func (c *GRPCClient) DiscoveryClient() (DiscoveryClient, error)
- func (c *GRPCClient) EndorserClient() (pb.EndorserClient, error)
- func (c *GRPCClient) OrdererClient() (ab.AtomicBroadcastClient, error)
- type GRPCClientFactory
- type OrdererClient
- type PeerClient
- type StatefulClient
- func (c *StatefulClient) Deliver(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverClient, error)
- func (c *StatefulClient) DeliverFiltered(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverFilteredClient, error)
- func (c *StatefulClient) DeliverWithPrivateData(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverWithPrivateDataClient, error)
- func (c *StatefulClient) Discover(ctx context.Context, in *discovery.SignedRequest, opts ...ggrpc.CallOption) (*discovery.Response, error)
- func (c *StatefulClient) ProcessProposal(ctx context.Context, in *peer.SignedProposal, opts ...ggrpc.CallOption) (*peer.ProposalResponse, error)
- func (c *StatefulClient) Send(ctx context.Context, req *dclient.Request, auth *discovery.AuthInfo) (dclient.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLazyGRPCClient ¶
func NewLazyGRPCClient(pc *GRPCClient) *lazyGRPCClient
Types ¶
type CachingClientFactory ¶
type CachingClientFactory struct {
// contains filtered or unexported fields
}
func NewCachingClientFactory ¶
func NewCachingClientFactory(configService driver.ConfigService, signer driver.Signer) *CachingClientFactory
func (*CachingClientFactory) NewOrdererClient ¶
func (cep *CachingClientFactory) NewOrdererClient(cc grpc.ConnectionConfig) (OrdererClient, error)
func (*CachingClientFactory) NewPeerClient ¶
func (cep *CachingClientFactory) NewPeerClient(cc grpc.ConnectionConfig) (PeerClient, error)
type Client ¶
type Client interface {
// Address returns the address of the peer this client is connected to
Address() string
// Certificate returns the tls.Certificate used to make TLS connections
// when client certificates are required by the server
Certificate() tls.Certificate
// Close closes this client
Close()
}
Client represents a client interface for the peer
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
func NewClientFactory ¶
func NewClientFactory(configService driver.ConfigService, signer driver.Signer) *ClientFactory
func (*ClientFactory) NewOrdererClient ¶
func (c *ClientFactory) NewOrdererClient(cc grpc.ConnectionConfig) (OrdererClient, error)
func (*ClientFactory) NewPeerClient ¶
func (c *ClientFactory) NewPeerClient(cc grpc.ConnectionConfig) (PeerClient, error)
type ClientWrapper ¶
type ClientWrapper struct {
// contains filtered or unexported fields
}
func NewClientWrapper ¶
func NewClientWrapper(pc *GRPCClient) *ClientWrapper
func (*ClientWrapper) Address ¶
func (c *ClientWrapper) Address() string
func (*ClientWrapper) Certificate ¶
func (c *ClientWrapper) Certificate() tls.Certificate
func (*ClientWrapper) Close ¶
func (c *ClientWrapper) Close()
func (*ClientWrapper) DeliverClient ¶
func (c *ClientWrapper) DeliverClient() (peer.DeliverClient, error)
func (*ClientWrapper) DiscoveryClient ¶
func (c *ClientWrapper) DiscoveryClient() (DiscoveryClient, error)
func (*ClientWrapper) EndorserClient ¶
func (c *ClientWrapper) EndorserClient() (peer.EndorserClient, error)
func (*ClientWrapper) OrdererClient ¶
func (c *ClientWrapper) OrdererClient() (ab.AtomicBroadcastClient, error)
type DiscoveryClient ¶
type DiscoveryClient interface {
// Send sends a request to the discovery service
Send(ctx context.Context, req *dclient.Request, auth *discovery.AuthInfo) (dclient.Response, error)
}
DiscoveryClient represents an interface for discovery service
type GRPCClient ¶
GRPCClient represents a grpc-based client for communicating with a peer
func NewGRPCClient ¶
func NewGRPCClient(client *grpc.Client, address string, sn string, signer discovery2.Signer) *GRPCClient
func (*GRPCClient) Address ¶
func (c *GRPCClient) Address() string
func (*GRPCClient) Certificate ¶
func (c *GRPCClient) Certificate() tls.Certificate
func (*GRPCClient) Close ¶
func (c *GRPCClient) Close()
func (*GRPCClient) DeliverClient ¶
func (c *GRPCClient) DeliverClient() (pb.DeliverClient, error)
func (*GRPCClient) DiscoveryClient ¶
func (c *GRPCClient) DiscoveryClient() (DiscoveryClient, error)
func (*GRPCClient) EndorserClient ¶
func (c *GRPCClient) EndorserClient() (pb.EndorserClient, error)
func (*GRPCClient) OrdererClient ¶
func (c *GRPCClient) OrdererClient() (ab.AtomicBroadcastClient, error)
type GRPCClientFactory ¶
type GRPCClientFactory struct {
ConfigService driver.ConfigService
Signer driver.Signer
}
func (*GRPCClientFactory) NewOrdererClient ¶
func (c *GRPCClientFactory) NewOrdererClient(cc grpc.ConnectionConfig) (OrdererClient, error)
func (*GRPCClientFactory) NewPeerClient ¶
func (c *GRPCClientFactory) NewPeerClient(cc grpc.ConnectionConfig) (PeerClient, error)
type OrdererClient ¶
type OrdererClient interface {
Client
// OrdererClient returns an orderer client
OrdererClient() (ab.AtomicBroadcastClient, error)
}
type PeerClient ¶
type PeerClient interface {
Client
// EndorserClient returns an endorser client for the peer
EndorserClient() (peer.EndorserClient, error)
// DiscoveryClient returns a discovery client for the peer
DiscoveryClient() (DiscoveryClient, error)
// DeliverClient returns a deliver client for the peer
DeliverClient() (peer.DeliverClient, error)
}
type StatefulClient ¶
type StatefulClient struct {
peer.EndorserClient
discovery.DiscoveryClient
DC DiscoveryClient
DeliverClient peer.DeliverClient
// contains filtered or unexported fields
}
func (*StatefulClient) Deliver ¶
func (c *StatefulClient) Deliver(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverClient, error)
func (*StatefulClient) DeliverFiltered ¶
func (c *StatefulClient) DeliverFiltered(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverFilteredClient, error)
func (*StatefulClient) DeliverWithPrivateData ¶
func (c *StatefulClient) DeliverWithPrivateData(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverWithPrivateDataClient, error)
func (*StatefulClient) Discover ¶
func (c *StatefulClient) Discover(ctx context.Context, in *discovery.SignedRequest, opts ...ggrpc.CallOption) (*discovery.Response, error)
func (*StatefulClient) ProcessProposal ¶
func (c *StatefulClient) ProcessProposal(ctx context.Context, in *peer.SignedProposal, opts ...ggrpc.CallOption) (*peer.ProposalResponse, error)
Click to show internal directories.
Click to hide internal directories.