2017-05-25 12:01:56 +00:00
|
|
|
#ifndef OD_POOLER_H
|
|
|
|
#define OD_POOLER_H
|
|
|
|
|
|
|
|
/*
|
2017-07-05 12:42:49 +00:00
|
|
|
* Odissey.
|
2017-05-25 12:01:56 +00:00
|
|
|
*
|
2017-07-05 12:42:49 +00:00
|
|
|
* Advanced PostgreSQL connection pooler.
|
2017-05-25 12:01:56 +00:00
|
|
|
*/
|
|
|
|
|
2017-06-19 14:39:12 +00:00
|
|
|
typedef struct od_pooler od_pooler_t;
|
|
|
|
typedef struct od_poolerserver od_poolerserver_t;
|
|
|
|
|
|
|
|
struct od_poolerserver
|
|
|
|
{
|
2017-08-29 14:43:41 +00:00
|
|
|
struct addrinfo *addr;
|
|
|
|
od_schemelisten_t *scheme;
|
2018-02-26 12:57:26 +00:00
|
|
|
machine_io_t *io;
|
2017-08-29 14:43:41 +00:00
|
|
|
machine_tls_t *tls;
|
|
|
|
od_system_t *system;
|
2017-06-19 14:39:12 +00:00
|
|
|
};
|
2017-05-25 12:01:56 +00:00
|
|
|
|
|
|
|
struct od_pooler
|
|
|
|
{
|
2017-06-19 14:39:12 +00:00
|
|
|
int64_t machine;
|
|
|
|
struct addrinfo *addr;
|
2018-02-02 12:50:23 +00:00
|
|
|
od_system_t system;
|
|
|
|
od_instance_t *instance;
|
2017-05-25 12:01:56 +00:00
|
|
|
};
|
|
|
|
|
2018-02-02 12:50:23 +00:00
|
|
|
int od_pooler_init(od_pooler_t*, od_instance_t*);
|
2017-05-26 11:49:17 +00:00
|
|
|
int od_pooler_start(od_pooler_t*);
|
2017-05-25 12:01:56 +00:00
|
|
|
|
|
|
|
#endif /* OD_INSTANCE_H */
|