Files
haproxy/include/haproxy/guid.h
Amaury Denoyelle 84fa6b344a MINOR: guid: introduce global UID module
Define a new module guid. Its purpose is to be able to attach a global
identifier for various objects such as proxies, servers and listeners.

A new type guid_node is defined. It will be stored in the objects which
can be referenced by such GUID. Several functions are implemented to
properly initialized, insert, remove and lookup GUID in a global tree.
Modification operations should only be conducted under thread isolation.
2024-04-05 15:40:42 +02:00

16 lines
394 B
C

#ifndef _HAPROXY_GUID_H
#define _HAPROXY_GUID_H
#include <haproxy/guid-t.h>
extern struct eb_root guid_tree;
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);
char *guid_name(const struct guid_node *guid);
#endif /* _HAPROXY_GUID_H */