提交 26a96ba7 编写于 作者: S Shengliang Guan

[TD-10430] header file for the dnode module

上级 b04ab19b
......@@ -20,53 +20,56 @@
extern "C" {
#endif
struct SRpcMsg;
struct SRpcEpSet;
/**
* 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
*
* @param dnode Instance of dnode module
*/
void dnodeCleanup();
void dnodeCleanupInstance(struct Dnode *dnode);
/**
* 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 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.
*
* @param dnode The instance of dnode module
* @param rpcMsg Message to be sent.
*/
void dnodeSendMsgToMnode(SRpcMsg *rpcMsg);
void dnodeSendMsgToMnode(struct Dnode *dnode, struct SRpcMsg *rpcMsg);
/**
* Get the corresponding endpoint information from dnodeId.
* Send redirect message to dnode or shell.
*
* @param dnodeId
* @param ep The endpoint of dnode
* @param fqdn The fqdn of dnode
* @param port The port of dnode
* @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 dnodeGetDnodeEp(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
void dnodeSendRedirectMsg(struct Dnode *dnode, struct SRpcMsg *rpcMsg, bool forShell);
/**
* Report to dnode the start-up steps of other modules
* Get the corresponding endpoint information from dnodeId.
*
* @param name Name of the start-up phase.
* @param desc Description of the start-up phase.
* @param dnode The instance of Dnode module
* @param dnodeId The id ot dnode
* @param ep The endpoint of dnode
* @param fqdn The fqdn of dnode
* @param port The port of dnode
*/
void dnodeReportStartup(char *name, char *desc);
void dnodeGetDnodeEp(struct Dnode *dnode, int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
#ifdef __cplusplus
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册