2018-08-28 14:43:46 +00:00
|
|
|
#ifndef ODYSSEY_SYSTEM_H
|
|
|
|
#define ODYSSEY_SYSTEM_H
|
2018-03-13 13:26:04 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Odyssey.
|
|
|
|
*
|
2018-04-04 13:19:58 +00:00
|
|
|
* Scalable PostgreSQL connection pooler.
|
2020-04-02 11:00:56 +00:00
|
|
|
*/
|
2018-03-13 13:26:04 +00:00
|
|
|
|
2020-07-26 07:58:15 +00:00
|
|
|
#include "macro.h"
|
|
|
|
#include "atomic.h"
|
|
|
|
#include "config.h"
|
|
|
|
#include "global.h"
|
|
|
|
#include "id.h"
|
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
typedef struct od_system_server od_system_server_t;
|
2020-04-02 11:00:56 +00:00
|
|
|
typedef struct od_system od_system_t;
|
2018-03-13 13:26:04 +00:00
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
struct od_system_server
|
2018-03-13 13:26:04 +00:00
|
|
|
{
|
2020-04-02 11:00:56 +00:00
|
|
|
machine_io_t *io;
|
|
|
|
machine_tls_t *tls;
|
2018-08-28 14:43:46 +00:00
|
|
|
od_config_listen_t *config;
|
2020-04-02 11:00:56 +00:00
|
|
|
struct addrinfo *addr;
|
|
|
|
od_global_t *global;
|
2020-07-08 15:10:13 +00:00
|
|
|
od_list_t link;
|
2020-07-26 07:58:15 +00:00
|
|
|
od_id_t sid;
|
|
|
|
|
|
|
|
volatile bool closed;
|
2020-08-08 16:00:31 +00:00
|
|
|
volatile bool pre_exited;
|
2018-03-13 13:26:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct od_system
|
|
|
|
{
|
2020-04-02 11:00:56 +00:00
|
|
|
int64_t machine;
|
2018-12-06 14:23:15 +00:00
|
|
|
od_global_t *global;
|
2018-03-13 13:26:04 +00:00
|
|
|
};
|
|
|
|
|
2020-04-02 11:00:56 +00:00
|
|
|
void
|
|
|
|
od_system_init(od_system_t *);
|
|
|
|
int
|
|
|
|
od_system_start(od_system_t *, od_global_t *);
|
2020-05-25 09:47:13 +00:00
|
|
|
void
|
|
|
|
od_system_config_reload(od_system_t *);
|
2018-03-13 13:26:04 +00:00
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
#endif /* ODYSSEY_SYSTEM_H */
|