servicenetwork

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceNetwork

type ServiceNetwork struct {
	// contains filtered or unexported fields
}

ServiceNetwork is facade for network.

func NewServiceNetwork

func NewServiceNetwork(
	hostConf configuration.HostNetwork,
	nodeConf configuration.NodeNetwork,
) (*ServiceNetwork, error)

NewServiceNetwork returns a new ServiceNetwork.

func (*ServiceNetwork) GetAddress

func (network *ServiceNetwork) GetAddress() string

GetAddress returns host public address.

func (*ServiceNetwork) GetHostNetwork added in v0.0.6

func (network *ServiceNetwork) GetHostNetwork() (hosthandler.HostHandler, hosthandler.Context)

GetHostNetwork returns pointer to host network layer(DHT), temp method, refactoring needed

func (*ServiceNetwork) GetNodeID added in v0.2.0

func (network *ServiceNetwork) GetNodeID() core.RecordRef

GetNodeID returns current node id.

func (*ServiceNetwork) RemoteProcedureRegister

func (network *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)

RemoteProcedureRegister registers procedure for remote call on this host.

func (*ServiceNetwork) SendCascadeEvent added in v0.3.0

func (network *ServiceNetwork) SendCascadeEvent(data core.Cascade, method string, event core.Event) error

SendCascadeEvent sends a event from EventBus to a cascade of nodes. Event reference is ignored

func (*ServiceNetwork) SendEvent added in v0.3.0

func (network *ServiceNetwork) SendEvent(nodeID core.RecordRef, method string, event core.Event) ([]byte, error)

SendEvent sends a event from EventBus.

func (*ServiceNetwork) Start added in v0.0.6

func (network *ServiceNetwork) Start(components core.Components) error

Start implements core.Component

func (*ServiceNetwork) Stop added in v0.0.6

func (network *ServiceNetwork) Stop() error

Stop implements core.Component

Jump to

Keyboard shortcuts

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