conduit

package
v0.26.8-execution-fix-... Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: AGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Close

func (c *Conduit) Close() error

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.

func (*Conduit) Unicast

func (c *Conduit) Unicast(event interface{}, targetID flow.Identifier) error

Unicast sends an event in a reliable way to the given recipient. It uses 1-1 direct messaging over the underlying network to deliver the event. It returns an error if the unicast fails.

type DefaultConduitFactory

type DefaultConduitFactory struct {
	*component.ComponentManager
	// 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 network.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.

Jump to

Keyboard shortcuts

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