Documentation ¶
Index ¶
- func ConfigureOptions(conf configuration.Configuration) *common.Options
- func NewNetworkController(net network.HostNetwork) network.Controller
- type Controller
- func (c *Controller) Bootstrap(ctx context.Context) (*network.BootstrapResult, error)
- func (c *Controller) GetLastIgnoredPulse() core.PulseNumber
- func (c *Controller) Init(ctx context.Context) error
- 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
- type RequestCascade
- type RequestRPC
- type ResponseCascade
- type ResponseRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureOptions ¶
func ConfigureOptions(conf configuration.Configuration) *common.Options
ConfigureOptions convert daemon configuration to controller options
func NewNetworkController ¶
func NewNetworkController(net network.HostNetwork) network.Controller
NewNetworkController create new network controller.
Types ¶
type Controller ¶
type Controller struct { Bootstrapper bootstrap.NetworkBootstrapper `inject:""` RPCController RPCController `inject:""` // contains filtered or unexported fields }
Controller contains network logic.
func (*Controller) Bootstrap ¶
func (c *Controller) Bootstrap(ctx context.Context) (*network.BootstrapResult, 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) Init ¶ added in v0.8.0
func (c *Controller) Init(ctx context.Context) error
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 ¶
func NewPulseController ¶
func NewPulseController(hostNetwork network.HostNetwork, routingTable network.RoutingTable) PulseController
type RPCController ¶
type RPCController interface { component.Initer // hack for DI, else we receive ServiceNetwork injection in RPCController instead of rpcController that leads to stack overflow IAmRPCController() SendMessage(nodeID core.RecordRef, name string, msg core.Parcel) ([]byte, error) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error RemoteProcedureRegister(name string, method core.RemoteProcedure) }
func NewRPCController ¶
func NewRPCController(options *common.Options, hostNetwork network.HostNetwork) RPCController
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.