proxy

package
v0.37.8-migration-mainnet Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 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.EngineRegistry
	// contains filtered or unexported fields
}

func NewProxyNetwork

func NewProxyNetwork(net network.EngineRegistry, 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