remove dnode.h
This commit is contained in:
parent
d9fc5d8c3f
commit
f528d5a13d
|
@ -1,79 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
|
||||||
*
|
|
||||||
* This program is free software: you can use, redistribute, and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License, version 3
|
|
||||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _TD_DNODE_H_
|
|
||||||
#define _TD_DNODE_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct SRpcEpSet;
|
|
||||||
struct SRpcMsg;
|
|
||||||
/**
|
|
||||||
* 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(struct SRpcEpSet *epSet, struct SRpcMsg *rpcMsg);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send messages to mnode, such as config message.
|
|
||||||
*
|
|
||||||
* @param rpcMsg, message to be sent.
|
|
||||||
*/
|
|
||||||
void dnodeSendMsgToMnode(struct SRpcMsg *rpcMsg);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send redirect message to dnode or shell.
|
|
||||||
*
|
|
||||||
* @param rpcMsg, message to be sent.
|
|
||||||
* @param forShell, used to identify whether to send to shell or dnode.
|
|
||||||
*/
|
|
||||||
void dnodeSendRedirectMsg(struct SRpcMsg *rpcMsg, bool forShell);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the corresponding endpoint information from dnodeId.
|
|
||||||
*
|
|
||||||
* @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 dnodeGetEp(int32_t dnodeId, char *ep, char *fqdn, uint16_t *port);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Report the startup progress.
|
|
||||||
*/
|
|
||||||
void dnodeReportStartup(char *name, char *desc);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /*_TD_DNODE_H_*/
|
|
|
@ -25,7 +25,6 @@ extern "C" {
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
#include "trpc.h"
|
#include "trpc.h"
|
||||||
#include "ttimer.h"
|
#include "ttimer.h"
|
||||||
#include "dnode.h"
|
|
||||||
|
|
||||||
extern int32_t dDebugFlag;
|
extern int32_t dDebugFlag;
|
||||||
|
|
||||||
|
@ -38,6 +37,9 @@ extern int32_t dDebugFlag;
|
||||||
|
|
||||||
typedef enum { DN_RUN_STAT_INIT, DN_RUN_STAT_RUNNING, DN_RUN_STAT_STOPPED } EDnStat;
|
typedef enum { DN_RUN_STAT_INIT, DN_RUN_STAT_RUNNING, DN_RUN_STAT_STOPPED } EDnStat;
|
||||||
|
|
||||||
|
int32_t dnodeInit();
|
||||||
|
void dnodeCleanup();
|
||||||
|
|
||||||
EDnStat dnodeGetRunStat();
|
EDnStat dnodeGetRunStat();
|
||||||
void dnodeSetRunStat();
|
void dnodeSetRunStat();
|
||||||
void dnodeGetStartup(SStartupStep *);
|
void dnodeGetStartup(SStartupStep *);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "ulog.h"
|
#include "ulog.h"
|
||||||
#include "dnode.h"
|
#include "dnodeInt.h"
|
||||||
|
|
||||||
static bool stop = false;
|
static bool stop = false;
|
||||||
static void sigintHandler(int32_t signum, void *info, void *ctx) { stop = true; }
|
static void sigintHandler(int32_t signum, void *info, void *ctx) { stop = true; }
|
||||||
|
|
Loading…
Reference in New Issue