Files
haproxy/include/haproxy/guid.h
Aurelien DARRAGON 4c3a36c609 MINOR: guid: add guid_count() function
returns the total amount of registered GUIDs in the guid_tree
2025-08-07 22:26:58 +02:00

28 lines
717 B
C

#ifndef _HAPROXY_GUID_H
#define _HAPROXY_GUID_H
#include <haproxy/api-t.h>
#include <haproxy/guid-t.h>
#include <haproxy/thread-t.h>
__decl_thread(extern HA_RWLOCK_T guid_lock);
void guid_init(struct guid_node *node);
int guid_insert(enum obj_type *obj_type, const char *uid, char **errmsg);
void guid_remove(struct guid_node *guid);
struct guid_node *guid_lookup(const char *uid);
/* Returns the actual text key associated to <guid> node or NULL if not
* set
*/
static inline const char *guid_get(const struct guid_node *guid)
{
return guid->node.key;
}
int guid_is_valid_fmt(const char *uid, char **errmsg);
char *guid_name(const struct guid_node *guid);
int guid_count(void);
#endif /* _HAPROXY_GUID_H */