[TD-10430] header file for the dnode module
This commit is contained in:
parent
b04ab19be4
commit
26a96ba78d
|
@ -20,53 +20,56 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct SRpcMsg;
|
|
||||||
struct SRpcEpSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize and start the dnode module
|
* Initialize and start the dnode module
|
||||||
*
|
*
|
||||||
* @return Error Code
|
* @return Instance of dnode module
|
||||||
*/
|
*/
|
||||||
int32_t dnodeInit();
|
struct Dnode *dnodeCreateInstance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop and cleanup dnode module
|
* Stop and cleanup dnode module
|
||||||
|
*
|
||||||
|
* @param dnode Instance of dnode module
|
||||||
*/
|
*/
|
||||||
void dnodeCleanup();
|
void dnodeCleanupInstance(struct Dnode *dnode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send messages to other dnodes, such as create vnode message.
|
* Send messages to other dnodes, such as create vnode message.
|
||||||
*
|
*
|
||||||
|
* @param dnode The instance of Dnode module
|
||||||
* @param epSet The endpoint list of the dnodes.
|
* @param epSet The endpoint list of the dnodes.
|
||||||
* @param rpcMsg Message to be sent.
|
* @param rpcMsg Message to be sent.
|
||||||
*/
|
*/
|
||||||
void dnodeSendMsgToDnode(SRpcEpSet *epSet, SRpcMsg *rpcMsg);
|
void dnodeSendMsgToDnode(struct Dnode *dnode, struct SRpcEpSet *epSet, struct SRpcMsg *rpcMsg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send messages to mnode, such as config message.
|
* Send messages to mnode, such as config message.
|
||||||
*
|
*
|
||||||
|
* @param dnode The instance of dnode module
|
||||||
* @param rpcMsg Message to be sent.
|
* @param rpcMsg Message to be sent.
|
||||||
*/
|
*/
|
||||||
void dnodeSendMsgToMnode(SRpcMsg *rpcMsg);
|
void dnodeSendMsgToMnode(struct Dnode *dnode, struct SRpcMsg *rpcMsg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send redirect message to dnode or shell.
|
||||||
|
*
|
||||||
|
* @param dnode The instance of dnode module
|
||||||
|
* @param rpcMsg Message to be sent.
|
||||||
|
* @param forShell Used to identify whether to send to shell or dnode.
|
||||||
|
*/
|
||||||
|
void dnodeSendRedirectMsg(struct Dnode *dnode, struct SRpcMsg *rpcMsg, bool forShell);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the corresponding endpoint information from dnodeId.
|
* Get the corresponding endpoint information from dnodeId.
|
||||||
*
|
*
|
||||||
* @param dnodeId
|
* @param dnode The instance of Dnode module
|
||||||
|
* @param dnodeId The id ot dnode
|
||||||
* @param ep The endpoint of dnode
|
* @param ep The endpoint of dnode
|
||||||
* @param fqdn The fqdn of dnode
|
* @param fqdn The fqdn of dnode
|
||||||
* @param port The port of dnode
|
* @param port The port of dnode
|
||||||
*/
|
*/
|
||||||
void dnodeGetDnodeEp(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
void dnodeGetDnodeEp(struct Dnode *dnode, int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Report to dnode the start-up steps of other modules
|
|
||||||
*
|
|
||||||
* @param name Name of the start-up phase.
|
|
||||||
* @param desc Description of the start-up phase.
|
|
||||||
*/
|
|
||||||
void dnodeReportStartup(char *name, char *desc);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue