odyssey/sources/router_cancel.h

32 lines
533 B
C
Raw Normal View History

2018-02-22 13:43:52 +00:00
#ifndef OD_ROUTER_CANCEL_H
#define OD_ROUTER_CANCEL_H
/*
2018-03-12 14:03:15 +00:00
* Odyssey.
2018-02-22 13:43:52 +00:00
*
* Advanced PostgreSQL connection pooler.
*/
typedef struct
{
od_id_t id;
od_configstorage_t *config;
shapito_key_t key;
2018-02-22 13:43:52 +00:00
} od_routercancel_t;
static inline void
od_routercancel_init(od_routercancel_t *cancel)
{
cancel->config = NULL;
2018-02-22 13:43:52 +00:00
shapito_key_init(&cancel->key);
}
static inline void
od_routercancel_free(od_routercancel_t *cancel)
{
if (cancel->config)
od_configstorage_free(cancel->config);
2018-02-22 13:43:52 +00:00
}
2018-03-12 14:03:15 +00:00
#endif /* OD_ROUTER_CANCEL_H */