Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressOverride ¶ added in v1.5.6
type Config ¶
type Config struct { IsStaticLeader bool // CryptoSvc performs cryptographic actions like message verification and signing // and identity validation. CryptoSvc blocksprovider.BlockVerifier // Gossip enables to enumerate peers in the channel, send a message to peers, // and add a block to the gossip state transfer layer. Gossip blocksprovider.GossipServiceAdapter // OrdererSource provides orderer endpoints, complete with TLS cert pools. OrdererSource *orderers.ConnectionSource // Signer is the identity used to sign requests. Signer identity.SignerSerializer // GRPC Client DeliverGRPCClient *comm.GRPCClient // Configuration values for deliver service. // TODO: merge 2 Config struct DeliverServiceConfig *DeliverServiceConfig }
Config dictates the DeliveryService's properties, namely how it connects to an ordering service endpoint, how it verifies messages received from it, and how it disseminates the messages to other peers
type DeliverAdapter ¶ added in v1.5.6
type DeliverAdapter struct{}
func (DeliverAdapter) Deliver ¶ added in v1.5.6
func (DeliverAdapter) Deliver(ctx context.Context, clientConn *grpc.ClientConn) (orderer.AtomicBroadcast_DeliverClient, error)
type DeliverService ¶
type DeliverService interface { // StartDeliverForChannel dynamically starts delivery of new blocks from ordering service // to channel peers. // When the delivery finishes, the finalizer func is called StartDeliverForChannel(chainID string, ledgerInfo blocksprovider.LedgerInfo, finalizer func()) error // StopDeliverForChannel dynamically stops delivery of new blocks from ordering service // to channel peers. StopDeliverForChannel(chainID string) error // Stop terminates delivery service and closes the connection Stop() }
DeliverService used to communicate with orderers to obtain new blocks and send them to the committer service
func NewDeliverService ¶
func NewDeliverService(conf *Config) DeliverService
NewDeliverService construction function to create and initialize delivery service instance. It tries to establish connection to the specified in the configuration ordering service, in case it fails to dial to it, return nil
type DeliverServiceConfig ¶ added in v1.5.6
type DeliverServiceConfig struct { // PeerTLSEnabled enables/disables Peer TLS. PeerTLSEnabled bool // ReConnectBackoffThreshold sets the delivery service maximal delay between consencutive retries. ReConnectBackoffThreshold time.Duration // ReconnectTotalTimeThreshold sets the total time the delivery service may spend in reconnection attempts // until its retry logic gives up and returns an error. ReconnectTotalTimeThreshold time.Duration // ConnectionTimeout sets the delivery service <-> ordering service node connection timeout ConnectionTimeout time.Duration // Keepalive option for deliveryservice KeepaliveOptions comm.KeepaliveOptions // SecOpts provides the TLS info for connections SecOpts comm.SecureOptions // OrdererEndpointOverrides is a map of orderer addresses which should be // re-mapped to a different orderer endpoint. OrdererEndpointOverrides map[string]*orderers.Endpoint }
DeliverServiceConfig is the struct that defines the deliverservice configuration.
func GlobalConfig ¶ added in v1.5.6
func GlobalConfig() *DeliverServiceConfig
GlobalConfig obtains a set of configuration from viper, build and returns the config struct.
type DialerAdapter ¶ added in v1.5.6
type DialerAdapter struct {
Client *comm.GRPCClient
}
func (DialerAdapter) Dial ¶ added in v1.5.6
func (da DialerAdapter) Dial(address string, certPool *x509.CertPool) (*grpc.ClientConn, error)