deliverservice

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReConnectBackoffThreshold   = float64(time.Hour)
	DefaultReConnectTotalTimeThreshold = time.Second * 60 * 60
	DefaultConnectionTimeout           = time.Second * 3
)

Variables

This section is empty.

Functions

func DefaultABCFactory

func DefaultABCFactory(conn *grpc.ClientConn) orderer.AtomicBroadcastClient

func NewBroadcastClient

func NewBroadcastClient(prod comm.ConnectionProducer, clFactory clientFactory, onConnect broadcastSetup, bos retryPolicy) *broadcastClient

Types

type Config

type Config struct {
	ConnFactory func(channelID string) func(endpoint string, connectionTimeout time.Duration) (*grpc.ClientConn, error)

	ABCFactory func(*grpc.ClientConn) orderer.AtomicBroadcastClient

	CryptoSvc api.MessageCryptoService

	Gossip blocksprovider.GossipServiceAdapter

	Endpoints []string

	Signer identity.SignerSerializer

	CredentialSupport *comm.CredentialSupport

	DeliverClientDialOpts []grpc.DialOption

	DeliverServiceConfig *DeliverServiceConfig
}

type ConnectionCriteria

type ConnectionCriteria struct {
	OrdererEndpoints []string

	Organizations []string

	OrdererEndpointsByOrg map[string][]string
}

type CredSupportDialerFactory

type CredSupportDialerFactory struct {
	CredentialSupport *comm.CredentialSupport
	KeepaliveOptions  comm.KeepaliveOptions
	TLSEnabled        bool
}

func (*CredSupportDialerFactory) Dialer

func (c *CredSupportDialerFactory) Dialer(channelID string) func(endpoint string, connectionTimeout time.Duration) (*grpc.ClientConn, error)

type DeliverService

type DeliverService interface {
	StartDeliverForChannel(chainID string, ledgerInfo blocksprovider.LedgerInfo, finalizer func()) error

	StopDeliverForChannel(chainID string) error

	UpdateEndpoints(chainID string, endpoints []string) error

	Stop()
}

func NewDeliverService

func NewDeliverService(conf *Config) (DeliverService, error)

type DeliverServiceConfig

type DeliverServiceConfig struct {
	PeerTLSEnabled bool

	ReConnectBackoffThreshold float64

	ReconnectTotalTimeThreshold time.Duration

	ConnectionTimeout time.Duration

	KeepaliveOptions comm.KeepaliveOptions
}

func GlobalConfig

func GlobalConfig() *DeliverServiceConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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