提交 ce7a1600 编写于 作者: S Shengliang Guan

TD-10430

上级 3bdd41fb
......@@ -20,6 +20,54 @@
extern "C" {
#endif
struct SRpcMsg;
struct SRpcEpSet;
/**
* Initialize and start the dnode module
*
* @return Error Code
*/
int32_t dnodeInit();
/**
* Stop and cleanup dnode module
*/
void dnodeCleanup();
/**
* Send messages to other dnodes, such as create vnode message.
*
* @param epSet The endpoint list of the dnodes.
* @param rpcMsg Message to be sent.
*/
void dnodeSendMsgToDnode(SRpcEpSet *epSet, SRpcMsg *rpcMsg);
/**
* Send messages to mnode, such as config message.
*
* @param rpcMsg Message to be sent.
*/
void dnodeSendMsgToMnode(SRpcMsg *rpcMsg);
/**
* Get the corresponding endpoint information from dnodeId.
*
* @param dnodeId
* @param ep The endpoint of dnode
* @param fqdn The fqdn of dnode
* @param port The port of dnode
*/
void dnodeGetDnodeEp(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
}
#endif
......
......@@ -20,6 +20,47 @@
extern "C" {
#endif
struct SRpcMsg;
/**
* Deploy Mnode instances in Dnode.
*
* @return Error Code.
*/
int32_t mnodeDeploy();
/**
* Delete the Mnode instance deployed in Dnode.
*/
void mnodeUnDeploy();
/**
* Start Mnode service.
*
* @return Error Code.
*/
int32_t mnodeStart();
/**
* Stop Mnode service.
*/
int32_t mnodeStop();
/**
* Interface for processing messages.
*
* @param pMsg Message to be processed.
* @return Error code
*/
int32_t mnodeProcessMsg(SRpcMsg *pMsg);
/**
* Whether the Mnode is in service.
*
* @return Server status.
*/
bool mnodeIsServing();
#ifdef __cplusplus
}
#endif
......
......@@ -11,4 +11,52 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
\ No newline at end of file
*/
#ifndef _TD_VNODE_H_
#define _TD_VNODE_H_
#ifdef __cplusplus
extern "C" {
#endif
struct SRpcMsg;
/**
* Start Initialize Vnode module.
*
* @return Error Code.
*/
int32_t vnodeInit();
/**
* Cleanup Vnode module.
*/
void vnodeCleanup();
typedef struct {
int64_t queryMsgCount;
int64_t writeMsgCount;
} SVnodeStat;
/**
* Get the statistical information of Vnode
*
* @param stat Statistical information.
* @return Error Code.
*/
int32_t vnodeGetStatistics(SVnodeStat *stat);
/**
* Interface for processing messages.
*
* @param pMsg Message to be processed.
* @return Error code
*/
int32_t vnodeProcessMsg(SRpcMsg *pMsg);
#ifdef __cplusplus
}
#endif
#endif /*_TD_VNODE_H_*/
\ No newline at end of file
......@@ -2,7 +2,7 @@ add_subdirectory(mnode)
add_subdirectory(vnode)
add_subdirectory(qnode)
aux_source_directory(dnode TAOSD_SRC)
aux_source_directory(taosd TAOSD_SRC)
add_executable(taosd ${TAOSD_SRC})
target_link_libraries(
taosd
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册