Documentation ¶
Index ¶
- type ServiceNetwork
- func (n *ServiceNetwork) GetAddress() string
- func (n *ServiceNetwork) GetGlobuleID() core.GlobuleID
- func (n *ServiceNetwork) GetNodeID() core.RecordRef
- func (n *ServiceNetwork) HandlePulse(ctx context.Context, pulse core.Pulse)
- func (n *ServiceNetwork) Init(ctx context.Context) error
- func (n *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (n *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
- func (n *ServiceNetwork) SendMessage(nodeID core.RecordRef, method string, msg core.Parcel) ([]byte, error)
- func (n *ServiceNetwork) Start(ctx context.Context) error
- func (n *ServiceNetwork) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceNetwork ¶
type ServiceNetwork struct { // dependencies Certificate core.Certificate `inject:""` NodeNetwork core.NodeNetwork `inject:""` PulseManager core.PulseManager `inject:""` CryptographyService core.CryptographyService `inject:""` NetworkCoordinator core.NetworkCoordinator `inject:""` ArtifactManager core.ArtifactManager `inject:""` CryptographyScheme core.PlatformCryptographyScheme `inject:""` NodeKeeper network.NodeKeeper `inject:""` // subcomponents PhaseManager phases.PhaseManager // `inject:""` MerkleCalculator merkle.Calculator // `inject:""` ConsensusNetwork network.ConsensusNetwork // `inject:""` PulseHandler network.PulseHandler Communicator phases.Communicator // contains filtered or unexported fields }
ServiceNetwork is facade for network.
func NewServiceNetwork ¶
func NewServiceNetwork(conf configuration.Configuration, scheme core.PlatformCryptographyScheme) (*ServiceNetwork, error)
NewServiceNetwork returns a new ServiceNetwork.
func (*ServiceNetwork) GetAddress ¶
func (n *ServiceNetwork) GetAddress() string
GetAddress returns host public address.
func (*ServiceNetwork) GetGlobuleID ¶ added in v0.6.3
func (n *ServiceNetwork) GetGlobuleID() core.GlobuleID
GetGlobuleID returns current globule id.
func (*ServiceNetwork) GetNodeID ¶ added in v0.2.0
func (n *ServiceNetwork) GetNodeID() core.RecordRef
GetNodeID returns current node id.
func (*ServiceNetwork) HandlePulse ¶ added in v0.6.3
func (n *ServiceNetwork) HandlePulse(ctx context.Context, pulse core.Pulse)
func (*ServiceNetwork) Init ¶ added in v0.6.3
func (n *ServiceNetwork) Init(ctx context.Context) error
Start implements component.Initer
func (*ServiceNetwork) RemoteProcedureRegister ¶
func (n *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 (n *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
SendCascadeMessage sends a message from MessageBus to a cascade of nodes
func (*ServiceNetwork) SendMessage ¶
func (n *ServiceNetwork) SendMessage(nodeID core.RecordRef, method string, msg core.Parcel) ([]byte, error)
SendMessage sends a message from MessageBus.
Click to show internal directories.
Click to hide internal directories.