Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // node has not yet been initalised ErrNotYetInitalised = errors.New("not yet initialised") // The jobstore corresponding to the key you are looking for does not exist on this node ErrNotSlotOwner = errors.New("not slot owner") // This means that this node is the owner of the slot and you are trying to access the remote connection to it ErrLocalSlotOwner = errors.New("local slot owner") // some other node handles the leader shard ErrNotShardLeader = errors.New("not shard leader") )
Functions ¶
This section is empty.
Types ¶
type NodeManager ¶
type NodeManager struct {
// contains filtered or unexported fields
}
func CreateNodeManager ¶
func CreateNodeManager( selfNodeID string, dsmgr *dsm.DataStoreManager, connMgr *connectionmanager.ConnectionManager, dhtMgr dht.DHT, cp consensus.Consensus, exe executor.Executor, log *zap.Logger, ) *NodeManager
func (*NodeManager) GetLocalShard ¶
func (*NodeManager) GetRemoteConnection ¶
func (nm *NodeManager) GetRemoteConnection(nodeID dht.NodeID) (js.JobStoreWithReplicator, error)
func (*NodeManager) InitAppDHT ¶
func (nm *NodeManager) InitAppDHT(shards, replicas int) error
Initialises the app DHT from the server list. It also publishes the slot and node map to other nodes via consensus module
func (*NodeManager) InitialiseNode ¶
func (nm *NodeManager) InitialiseNode() error
InitialiseNode will be called once the dht is initialised. It will help setting up the connections and initialise the datastores
Click to show internal directories.
Click to hide internal directories.