vnodeMain.h 1.4 KB
Newer Older
S
TD-2289  
Shengliang Guan 已提交
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/>.
 */

16 17
#ifndef _TD_VNODE_MAIN_H_
#define _TD_VNODE_MAIN_H_
S
TD-2289  
Shengliang Guan 已提交
18

L
Liu Jicong 已提交
19 20
#include "vnodeInt.h"

S
TD-2289  
Shengliang Guan 已提交
21 22 23 24
#ifdef __cplusplus
extern "C" {
#endif

25 26 27
int32_t vnodeInitMain();
void    vnodeCleanupMain();

S
TD-2289  
Shengliang Guan 已提交
28 29
int32_t vnodeCreate(SCreateVnodeMsg *pVnodeCfg);
int32_t vnodeDrop(int32_t vgId);
S
TD-2324  
Shengliang Guan 已提交
30
int32_t vnodeOpen(int32_t vgId);
31
int32_t vnodeAlter(SVnode *pVnode, SCreateVnodeMsg *pVnodeCfg);
32
int32_t vnodeSync(int32_t vgId);
S
TD-2289  
Shengliang Guan 已提交
33
int32_t vnodeClose(int32_t vgId);
34 35 36 37 38 39 40 41 42
void    vnodeCleanUp(SVnode *pVnode);
void    vnodeDestroy(SVnode *pVnode);
int32_t vnodeCompact(int32_t vgId);
void    vnodeBackup(int32_t vgId);
void    vnodeGetStatus(struct SStatusMsg *status);

SVnode *vnodeAcquire(int32_t vgId);
SVnode *vnodeAcquireNotClose(int32_t vgId);
void    vnodeRelease(SVnode *pVnode);
S
TD-2289  
Shengliang Guan 已提交
43 44 45 46 47

#ifdef __cplusplus
}
#endif

48
#endif /*_TD_VNODE_MAIN_H_*/