proxy

package
v0.29.16-temp-fix-sid Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyConduit

type ProxyConduit struct {
	network.Conduit
	// contains filtered or unexported fields
}

ProxyConduit is a special conduit which wraps the given conduit and replaces the target of every network send with the given target node.

func (*ProxyConduit) Multicast

func (c *ProxyConduit) Multicast(event interface{}, num uint, targetIDs ...flow.Identifier) error

func (*ProxyConduit) Publish

func (c *ProxyConduit) Publish(event interface{}, targetIDs ...flow.Identifier) error

func (*ProxyConduit) Unicast

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

type ProxyNetwork

type ProxyNetwork struct {
	network.Network
	// contains filtered or unexported fields
}

func NewProxyNetwork

func NewProxyNetwork(net network.Network, targetNodeID flow.Identifier) *ProxyNetwork

NewProxyNetwork creates a new proxy network. All messages sent on this network are sent only to the node identified by the given target ID.

func (*ProxyNetwork) Register

func (n *ProxyNetwork) Register(channel channels.Channel, engine network.Engine) (network.Conduit, error)

Register registers an engine with the proxy network.

Jump to

Keyboard shortcuts

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