support limit

This commit is contained in:
Rongsong Shen 2026-01-12 15:20:51 +08:00
parent bef32ace38
commit ecf1916d78
33 changed files with 3036 additions and 243 deletions

26
src/include/group.h Normal file
View file

@ -0,0 +1,26 @@
#if !defined(_GROUP_H_)
#define _GROUP_H_ 1
#include "kvmgr.h"
#include "xce/types.h"
#include "xlist.h"
#include "zarray.h"
typedef struct {
kvmgr_t groups;
} groupmgr_t;
extern int groupmgr_init(groupmgr_t*, int, int);
extern void groupmgr_fini(groupmgr_t*);
extern int groupmgr_add(groupmgr_t*, xce_group_t*);
extern xce_group_t* groupmgr_lock(groupmgr_t*, char*, int);
extern void groupmgr_del(groupmgr_t*, xce_group_t*);
extern int groupmgr_iter(groupmgr_t*, xlist_t*, void*);
extern xce_group_t* build_group(groupmgr_t*, xce_group_config_t*, char*);
extern int is_in_group(xce_group_t*, char*);
extern xce_group_t* get_group(groupmgr_t*, char*);
extern int fmt_group(char*, int, xce_group_t*);
extern int is_group_all(xce_group_t*);
#endif