This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-maat/src/inc_internal/maat_group.h

59 lines
1.9 KiB
C
Raw Normal View History

2023-01-06 18:54:59 +08:00
/*
**********************************************************************************************
* File: maat_group.h
* Description:
* Authors: Liu wentan <liuwentan@geedgenetworks.com>
* Date: 2022-10-31
2023-05-04 17:10:19 +08:00
* Copyright: (c) Since 2022 Geedge Networks, Ltd. All rights reserved.
2023-01-06 18:54:59 +08:00
***********************************************************************************************
*/
#ifndef _MAAT_GROUP_H_
#define _MAAT_GROUP_H_
#ifdef __cplusplus
2023-01-06 18:54:59 +08:00
extern "C"
{
#endif
#include <stdint.h>
2023-01-30 21:59:35 +08:00
#include "cJSON/cJSON.h"
#include "maat_kv.h"
#include "maat_table.h"
2023-01-06 18:54:59 +08:00
2023-02-03 17:28:14 +08:00
struct maat_group;
2023-04-18 09:32:21 +08:00
struct group2group_runtime;
2023-01-30 21:59:35 +08:00
/* group2group schema API */
2023-02-03 17:28:14 +08:00
void *group2group_schema_new(cJSON *json, struct table_manager *tbl_mgr,
const char *table_name, struct log_handle *logger);
2023-01-30 21:59:35 +08:00
void group2group_schema_free(void *g2g_schema);
/* group2group runtime API */
2023-04-20 15:34:56 +08:00
void *group2group_runtime_new(void *g2g_schema, size_t max_thread_num,
2023-02-03 17:28:14 +08:00
struct maat_garbage_bin *garbage_bin,
struct log_handle *logger);
2023-01-30 21:59:35 +08:00
void group2group_runtime_free(void *g2g_runtime);
int group2group_runtime_update(void *g2g_runtime, void *g2g_schema, const char *table_name,
const char *line, int valid_column);
int group2group_runtime_commit(void *g2g_runtime, const char *table_name, long long maat_rt_version);
2023-01-30 21:59:35 +08:00
size_t group2group_runtime_get_super_groups(void *g2g_runtime, long long *group_ids,
size_t n_group_ids, long long *super_group_ids,
size_t super_group_ids_size);
2023-04-12 19:20:05 +08:00
long long group2group_runtime_rule_count(void *g2g_runtime);
long long group2group_runtime_exclude_rule_count(void *g2g_runtime);
2023-04-20 15:34:56 +08:00
long long group2group_runtime_update_err_count(void *g2g_runtime);
#ifdef __cplusplus
2023-01-06 18:54:59 +08:00
}
#endif
2023-02-22 15:22:41 +08:00
#endif