mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-10 07:02:40 +02:00
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.
16 lines
394 B
C
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 */
|