Documentation ¶
Index ¶
- type ServiceNetwork
- func (network *ServiceNetwork) GetActiveNodeComponent() core.ActiveNodeComponent
- func (network *ServiceNetwork) GetAddress() string
- func (network *ServiceNetwork) GetHostNetwork() (hosthandler.HostHandler, hosthandler.Context)
- func (network *ServiceNetwork) GetNodeID() core.RecordRef
- func (network *ServiceNetwork) GetPrivateKey() *ecdsa.PrivateKey
- func (network *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (network *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Message) error
- func (network *ServiceNetwork) SendMessage(nodeID core.RecordRef, 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 ¶
This section is empty.
Types ¶
type ServiceNetwork ¶
type ServiceNetwork struct {
// contains filtered or unexported fields
}
ServiceNetwork is facade for network.
func NewServiceNetwork ¶
func NewServiceNetwork(conf configuration.Configuration) (*ServiceNetwork, error)
NewServiceNetwork returns a new ServiceNetwork.
func (*ServiceNetwork) GetActiveNodeComponent ¶ added in v0.6.1
func (network *ServiceNetwork) GetActiveNodeComponent() core.ActiveNodeComponent
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) GetPrivateKey ¶ added in v0.6.1
func (network *ServiceNetwork) GetPrivateKey() *ecdsa.PrivateKey
GetPrivateKey returns a private key.
func (*ServiceNetwork) RemoteProcedureRegister ¶
func (network *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
RemoteProcedureRegister registers procedure for remote call on this host.
func (*ServiceNetwork) SendCascadeMessage ¶ added in v0.2.0
func (network *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Message) error
SendCascadeMessage sends a message from MessageBus to a cascade of nodes. Message reference is ignored
func (*ServiceNetwork) SendMessage ¶
func (network *ServiceNetwork) SendMessage(nodeID core.RecordRef, method string, msg core.Message) ([]byte, error)
SendMessage sends a message from MessageBus.
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.