servicenetwork

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(value interface{}) ([]byte, error)

Serialize converts Message or Response to byte slice.

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

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

RemoteProcedureRegister registers procedure for remote call on this host.

func (*ServiceNetwork) SendMessage

func (network *ServiceNetwork) SendMessage(method string, msg *core.Message) ([]byte, error)

SendMessage sends a message from MessageRouter.

Jump to

Keyboard shortcuts

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