Documentation ¶
Index ¶
- type RootController
- func (ctrl *RootController) GetEnabledShards() []shard.Index
- func (ctrl *RootController) HandleRPCReq(req *message.RPCReq) *message.RPCResp
- func (ctrl *RootController) NotifyPeerAdd(cp *connection.ConnPeer)
- func (ctrl *RootController) NotifyPeerDone(cp *connection.ConnPeer)
- func (ctrl *RootController) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RootController ¶
type RootController struct {
// contains filtered or unexported fields
}
RootController is at the upper level of the business logic and is used to schedule work for all shards.
func NewRootController ¶
func NewRootController(cfg *config.Config, connector connection.Connector) *RootController
func (*RootController) GetEnabledShards ¶
func (ctrl *RootController) GetEnabledShards() []shard.Index
GetEnabledShards returns all enabled shard indexes.
func (*RootController) HandleRPCReq ¶
func (ctrl *RootController) HandleRPCReq(req *message.RPCReq) *message.RPCResp
HandleRPCReq should be the root entry for all RPC requests to get some internal state or trigger internal operation.
func (*RootController) NotifyPeerAdd ¶
func (ctrl *RootController) NotifyPeerAdd(cp *connection.ConnPeer)
NotifyPeerAdd notifies all shards a particular peer is connected
func (*RootController) NotifyPeerDone ¶
func (ctrl *RootController) NotifyPeerDone(cp *connection.ConnPeer)
NotifyPeerDone notifies all shards a particular peer is done (disconnected or not needed)
func (*RootController) Start ¶
func (ctrl *RootController) Start()
Start is used to start controller
Click to show internal directories.
Click to hide internal directories.