TDengine/include/libs/stream/streamSnapshot.h

36 lines
1.6 KiB
C
Raw Normal View History

2023-06-19 12:48:49 +00:00
/*
* 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 _STREAM_BACKEDN_SNAPSHOT_H_
#define _STREAM_BACKEDN_SNAPSHOT_H_
#include "tcommon.h"
2023-08-24 02:15:15 +00:00
#define STREAM_STATE_TRANSFER "stream-state-transfer"
2023-06-19 12:48:49 +00:00
typedef struct SStreamSnapReader SStreamSnapReader;
2023-06-25 06:35:20 +00:00
typedef struct SStreamSnapWriter SStreamSnapWriter;
2023-06-19 12:48:49 +00:00
2023-06-20 10:32:56 +00:00
typedef struct SStreamSnapHandle SStreamSnapHandle;
typedef struct SStreamSnapBlockHdr SStreamSnapBlockHdr;
2023-06-19 12:48:49 +00:00
2023-06-28 09:57:08 +00:00
int32_t streamSnapReaderOpen(void* pMeta, int64_t sver, int64_t ever, char* path, SStreamSnapReader** ppReader);
2023-06-20 10:32:56 +00:00
int32_t streamSnapReaderClose(SStreamSnapReader* pReader);
int32_t streamSnapRead(SStreamSnapReader* pReader, uint8_t** ppData, int64_t* size);
2023-06-19 12:48:49 +00:00
// SMetaSnapWriter ========================================
2023-06-28 09:57:08 +00:00
int32_t streamSnapWriterOpen(void* pMeta, int64_t sver, int64_t ever, char* path, SStreamSnapWriter** ppWriter);
2023-06-25 06:35:20 +00:00
int32_t streamSnapWrite(SStreamSnapWriter* pWriter, uint8_t* pData, uint32_t nData);
2023-06-25 09:03:01 +00:00
int32_t streamSnapWriterClose(SStreamSnapWriter* ppWriter, int8_t rollback);
2023-06-19 12:48:49 +00:00
#endif