Documentation
¶
Index ¶
- func Serialize(value interface{}) ([]byte, error)
- type ServiceNetwork
- func (network *ServiceNetwork) GetAddress() string
- func (network *ServiceNetwork) GetHostNetwork() (*hostnetwork.DHT, hostnetwork.Context)
- func (network *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (network *ServiceNetwork) SendMessage(method string, msg core.Message) ([]byte, error)
- func (network *ServiceNetwork) Start(components core.Components) error
- func (network *ServiceNetwork) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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() (*hostnetwork.DHT, hostnetwork.Context)
GetHostNetwork returns pointer to host network layer(DHT), temp method, refactoring needed
func (*ServiceNetwork) RemoteProcedureRegister ¶
func (network *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
RemoteProcedureRegister registers procedure for remote call on this host.
func (*ServiceNetwork) SendMessage ¶
SendMessage sends a message from MessageRouter.
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
Click to show internal directories.
Click to hide internal directories.