services

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

type GRPCClient struct {
	Client *grpc.Client
	// contains filtered or unexported fields
}

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 (*StatefulClient) DeliverFiltered

func (*StatefulClient) DeliverWithPrivateData

func (c *StatefulClient) DeliverWithPrivateData(ctx context.Context, opts ...ggrpc.CallOption) (peer.Deliver_DeliverWithPrivateDataClient, error)

func (*StatefulClient) Discover

func (*StatefulClient) ProcessProposal

func (c *StatefulClient) ProcessProposal(ctx context.Context, in *peer.SignedProposal, opts ...ggrpc.CallOption) (*peer.ProposalResponse, error)

func (*StatefulClient) Send

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL