dnode.h 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * 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/>.
 */

S
Shengliang Guan 已提交
16 17
#ifndef _TD_DNODE_H_
#define _TD_DNODE_H_
18

S
Shengliang Guan 已提交
19 20
#include "tdef.h"

21 22 23 24
#ifdef __cplusplus
extern "C" {
#endif

S
Shengliang Guan 已提交
25
/**
26
 * @brief Initialize the dnode
S
Shengliang Guan 已提交
27
 *
28
 * @param rtype for internal debug usage, default is 0
S
Shengliang Guan 已提交
29 30
 * @return int32_t 0 for success and -1 for failure
 */
31
int32_t dmInit(int8_t rtype);
S
Shengliang Guan 已提交
32 33

/**
34
 * @brief Cleanup the dnode
S
Shengliang Guan 已提交
35
 */
S
Shengliang Guan 已提交
36
void dmCleanup();
S
Shengliang Guan 已提交
37

S
shm  
Shengliang Guan 已提交
38
/**
39
 * @brief Run dnode.
S
shm  
Shengliang Guan 已提交
40
 */
41
int32_t dmRun();
S
shm  
Shengliang Guan 已提交
42

43 44 45 46 47
/**
 * @brief Stop dnode.
 */
void dmStop();

48 49 50 51
#ifdef __cplusplus
}
#endif

S
Shengliang Guan 已提交
52
#endif /*_TD_DNODE_H_*/