Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastFacade ¶
type BroadcastFacade struct {
// contains filtered or unexported fields
}
func NewBroadcastFacade ¶
func NewBroadcastFacade(rb ReliableBroadcast) BroadcastFacade
func (BroadcastFacade) Egress ¶
func (bf BroadcastFacade) Egress() chan<- []*types.Message
Egress is for messages that are sent by this node into the network.
func (BroadcastFacade) Subscribe ¶
func (bf BroadcastFacade) Subscribe(ctx context.Context) (*Subscription, error)
type Connection ¶
type Multiplexer ¶
type Multiplexer struct {
// contains filtered or unexported fields
}
func NewMultiplexer ¶
func NewMultiplexer(rb ReliableBroadcast) Multiplexer
func (Multiplexer) Subscribe ¶
func (m Multiplexer) Subscribe(ctx context.Context) (*Subscription, error)
type ReliableBroadcast ¶
type ReliableBroadcast struct {
// contains filtered or unexported fields
}
ReliableBroadcast guarantees that any sequnece of messages will be delivered atleast once and in order. Until peer is suspected by failure detector broadcaster will buffer and transmit message periodically. Once an ack received and message are in peer memory it is safe to stop. If peer crashes - it is peer responsbility to get missing data.
func NewReliableBroadcast ¶
func NewReliableBroadcast(logger *zap.SugaredLogger, network Network, configuration *types.LastConfiguration, conf Config) ReliableBroadcast
func (ReliableBroadcast) Egress ¶
func (rb ReliableBroadcast) Egress() chan<- []*types.Message
func (ReliableBroadcast) Watch ¶
func (rb ReliableBroadcast) Watch() <-chan []*types.Message
type Subscription ¶
type Subscription struct { Messages chan []*types.Message // contains filtered or unexported fields }
func (*Subscription) Stop ¶
func (s *Subscription) Stop()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.