2021-09-22 09:27:48 +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/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2021-12-27 10:43:27 +00:00
|
|
|
#ifndef _TD_SNODE_INT_H_
|
|
|
|
|
#define _TD_SNODE_INT_H_
|
|
|
|
|
|
|
|
|
|
#include "os.h"
|
|
|
|
|
|
|
|
|
|
#include "tlog.h"
|
|
|
|
|
#include "tmsg.h"
|
2022-03-10 09:15:45 +00:00
|
|
|
#include "tqueue.h"
|
2021-12-27 10:43:27 +00:00
|
|
|
#include "trpc.h"
|
2022-03-25 13:03:12 +00:00
|
|
|
#include "tstream.h"
|
2021-12-27 10:43:27 +00:00
|
|
|
|
|
|
|
|
#include "snode.h"
|
2021-09-22 09:27:48 +00:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-08-02 15:44:47 +00:00
|
|
|
typedef struct SSnode {
|
2022-10-28 09:03:17 +00:00
|
|
|
char* path;
|
|
|
|
|
SStreamMeta* pMeta;
|
|
|
|
|
SMsgCb msgCb;
|
2022-08-02 15:44:47 +00:00
|
|
|
} SSnode;
|
|
|
|
|
|
2022-08-02 14:23:33 +00:00
|
|
|
#if 0
|
2022-03-15 06:56:33 +00:00
|
|
|
typedef struct {
|
2022-03-16 10:29:31 +00:00
|
|
|
SHashObj* pHash; // taskId -> SStreamTask
|
2022-03-15 06:56:33 +00:00
|
|
|
} SStreamMeta;
|
|
|
|
|
|
2022-03-16 10:29:31 +00:00
|
|
|
SStreamMeta* sndMetaNew();
|
|
|
|
|
void sndMetaDelete(SStreamMeta* pMeta);
|
2022-03-10 09:15:45 +00:00
|
|
|
|
2022-03-16 11:40:48 +00:00
|
|
|
int32_t sndMetaDeployTask(SStreamMeta* pMeta, SStreamTask* pTask);
|
|
|
|
|
SStreamTask* sndMetaGetTask(SStreamMeta* pMeta, int32_t taskId);
|
|
|
|
|
int32_t sndMetaRemoveTask(SStreamMeta* pMeta, int32_t taskId);
|
2022-03-10 09:15:45 +00:00
|
|
|
|
2022-03-16 10:29:31 +00:00
|
|
|
int32_t sndDropTaskOfStream(SStreamMeta* pMeta, int64_t streamId);
|
|
|
|
|
int32_t sndStopTaskOfStream(SStreamMeta* pMeta, int64_t streamId);
|
|
|
|
|
int32_t sndResumeTaskOfStream(SStreamMeta* pMeta, int64_t streamId);
|
2022-08-02 14:23:33 +00:00
|
|
|
#endif
|
2022-03-10 09:15:45 +00:00
|
|
|
|
2023-05-25 09:51:03 +00:00
|
|
|
void initStreamStateAPI(SStorageAPI* pAPI);
|
|
|
|
|
|
2021-09-22 09:27:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-03-10 09:15:45 +00:00
|
|
|
#endif /*_TD_SNODE_INT_H_*/
|