Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conduit ¶
type Conduit struct {
// contains filtered or unexported fields
}
Conduit is a helper of the overlay layer which functions as an accessor for sending messages within a single engine process. It sends all messages to what can be considered a bus reserved for that specific engine.
func (*Conduit) Multicast ¶
func (c *Conduit) Multicast(event interface{}, num uint, targetIDs ...flow.Identifier) error
Multicast unreliably sends the specified event to the specified number of recipients selected from the specified subset. The recipients are selected randomly from targetIDs
func (*Conduit) Publish ¶
func (c *Conduit) Publish(event interface{}, targetIDs ...flow.Identifier) error
Publish sends an event to the network layer for unreliable delivery to subscribers of the given event on the network layer. It uses a publish-subscribe layer and can thus not guarantee that the specified recipients received the event.
type DefaultConduitFactory ¶
type DefaultConduitFactory struct {
// contains filtered or unexported fields
}
DefaultConduitFactory is a wrapper around the network Adapter. It directly passes the incoming messages to the corresponding methods of the network Adapter.
func NewDefaultConduitFactory ¶
func NewDefaultConduitFactory() *DefaultConduitFactory
func (*DefaultConduitFactory) NewConduit ¶
func (d *DefaultConduitFactory) NewConduit(ctx context.Context, channel channels.Channel) (network.Conduit, error)
NewConduit creates a conduit on the specified channel. Prior to creating any conduit, the factory requires an Adapter to be registered with it.
func (*DefaultConduitFactory) RegisterAdapter ¶
func (d *DefaultConduitFactory) RegisterAdapter(adapter network.Adapter) error
RegisterAdapter sets the Adapter component of the factory. The Adapter is a wrapper around the Network layer that only exposes the set of methods that are needed by a conduit.