odyssey/sources/router_cancel.h

32 lines
551 B
C
Raw Normal View History

#ifndef ODYSSEY_ROUTER_CANCEL_H
#define ODYSSEY_ROUTER_CANCEL_H
2018-02-22 13:43:52 +00:00
/*
2018-03-12 14:03:15 +00:00
* Odyssey.
2018-02-22 13:43:52 +00:00
*
2018-04-04 13:19:58 +00:00
* Scalable PostgreSQL connection pooler.
2018-02-22 13:43:52 +00:00
*/
typedef struct
{
od_id_t id;
od_rule_storage_t *storage;
kiwi_key_t key;
} od_router_cancel_t;
2018-02-22 13:43:52 +00:00
static inline void
od_router_cancel_init(od_router_cancel_t *cancel)
2018-02-22 13:43:52 +00:00
{
cancel->storage = NULL;
kiwi_key_init(&cancel->key);
2018-02-22 13:43:52 +00:00
}
static inline void
od_router_cancel_free(od_router_cancel_t *cancel)
2018-02-22 13:43:52 +00:00
{
if (cancel->storage)
od_rules_storage_free(cancel->storage);
2018-02-22 13:43:52 +00:00
}
#endif /* ODYSSEY_ROUTER_CANCEL_H */