Documentation ¶
Index ¶
- func ConfigureOptions(config configuration.HostNetwork) *common.Options
- func NewNetworkController(pulseHandler network.PulseHandler, options *common.Options, ...) network.Controller
- type Controller
- func (c *Controller) Bootstrap(ctx context.Context) error
- func (c *Controller) GetLastIgnoredPulse() core.PulseNumber
- func (c *Controller) Inject(cryptographyService core.CryptographyService, ...)
- func (c *Controller) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (c *Controller) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
- func (c *Controller) SendMessage(nodeID core.RecordRef, name string, msg core.Parcel) ([]byte, error)
- func (c *Controller) SetLastIgnoredPulse(number core.PulseNumber)
- type PulseController
- type RPCController
- func (rpc *RPCController) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (rpc *RPCController) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
- func (rpc *RPCController) SendMessage(nodeID core.RecordRef, name string, msg core.Parcel) ([]byte, error)
- func (rpc *RPCController) Start()
- type RequestCascade
- type RequestRPC
- type ResponseCascade
- type ResponseRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureOptions ¶
func ConfigureOptions(config configuration.HostNetwork) *common.Options
ConfigureOptions convert daemon configuration to controller options
func NewNetworkController ¶
func NewNetworkController( pulseHandler network.PulseHandler, options *common.Options, certificate core.Certificate, transport network.InternalTransport, routingTable network.RoutingTable, network network.HostNetwork, scheme core.PlatformCryptographyScheme) network.Controller
NewNetworkController create new network controller.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller contains network logic.
func (*Controller) Bootstrap ¶
func (c *Controller) Bootstrap(ctx context.Context) error
Bootstrap init bootstrap process: 1. Connect to discovery node; 2. Reconnect to new discovery node if redirected.
func (*Controller) GetLastIgnoredPulse ¶ added in v0.7.5
func (c *Controller) GetLastIgnoredPulse() core.PulseNumber
func (*Controller) Inject ¶
func (c *Controller) Inject(cryptographyService core.CryptographyService, networkCoordinator core.NetworkCoordinator, nodeKeeper network.NodeKeeper)
Inject inject components.
func (*Controller) RemoteProcedureRegister ¶
func (c *Controller) RemoteProcedureRegister(name string, method core.RemoteProcedure)
RemoteProcedureRegister register remote procedure that will be executed when message is received.
func (*Controller) SendCascadeMessage ¶
SendCascadeMessage sends a message from MessageBus to a cascade of nodes.
func (*Controller) SendMessage ¶
func (c *Controller) SendMessage(nodeID core.RecordRef, name string, msg core.Parcel) ([]byte, error)
SendParcel send message to nodeID.
func (*Controller) SetLastIgnoredPulse ¶ added in v0.7.5
func (c *Controller) SetLastIgnoredPulse(number core.PulseNumber)
type PulseController ¶
type PulseController struct {
// contains filtered or unexported fields
}
func NewPulseController ¶
func NewPulseController(pulseHandler network.PulseHandler, hostNetwork network.HostNetwork, routingTable network.RoutingTable) *PulseController
func (*PulseController) Start ¶
func (pc *PulseController) Start()
type RPCController ¶
type RPCController struct {
// contains filtered or unexported fields
}
func NewRPCController ¶
func NewRPCController(options *common.Options, hostNetwork network.HostNetwork, scheme core.PlatformCryptographyScheme) *RPCController
func (*RPCController) RemoteProcedureRegister ¶
func (rpc *RPCController) RemoteProcedureRegister(name string, method core.RemoteProcedure)
func (*RPCController) SendCascadeMessage ¶
func (*RPCController) SendMessage ¶
func (*RPCController) Start ¶
func (rpc *RPCController) Start()
type RequestCascade ¶
type RequestCascade struct { TraceID string RPC RequestRPC Cascade core.Cascade }
type RequestRPC ¶
type ResponseCascade ¶
type ResponseRPC ¶
Click to show internal directories.
Click to hide internal directories.