2018-08-28 14:43:46 +00:00
|
|
|
#ifndef ODYSSEY_GLOBAL_H
|
|
|
|
#define ODYSSEY_GLOBAL_H
|
2017-05-26 12:17:45 +00:00
|
|
|
|
|
|
|
/*
|
2018-03-12 14:03:15 +00:00
|
|
|
* Odyssey.
|
2017-05-26 12:17:45 +00:00
|
|
|
*
|
2018-04-04 13:19:58 +00:00
|
|
|
* Scalable PostgreSQL connection pooler.
|
2020-04-02 11:00:56 +00:00
|
|
|
*/
|
2017-05-26 12:17:45 +00:00
|
|
|
|
2018-03-13 13:17:27 +00:00
|
|
|
typedef struct od_global od_global_t;
|
2017-05-26 12:17:45 +00:00
|
|
|
|
2018-03-13 13:17:27 +00:00
|
|
|
struct od_global
|
2017-05-26 12:17:45 +00:00
|
|
|
{
|
|
|
|
void *instance;
|
2018-03-13 13:26:04 +00:00
|
|
|
void *system;
|
2017-05-26 12:17:45 +00:00
|
|
|
void *router;
|
2018-03-02 13:12:32 +00:00
|
|
|
void *cron;
|
2018-03-02 10:00:52 +00:00
|
|
|
void *worker_pool;
|
2020-06-09 09:19:11 +00:00
|
|
|
void *modules;
|
2017-05-26 12:17:45 +00:00
|
|
|
};
|
|
|
|
|
2018-12-06 14:23:15 +00:00
|
|
|
static inline void
|
|
|
|
od_global_init(od_global_t *global,
|
|
|
|
void *instance,
|
|
|
|
void *system,
|
|
|
|
void *router,
|
|
|
|
void *cron,
|
2020-06-09 09:19:11 +00:00
|
|
|
void *worker_pool,
|
|
|
|
void *modules)
|
2018-12-06 14:23:15 +00:00
|
|
|
{
|
|
|
|
global->instance = instance;
|
|
|
|
global->system = system;
|
|
|
|
global->router = router;
|
|
|
|
global->cron = cron;
|
|
|
|
global->worker_pool = worker_pool;
|
2020-06-09 09:19:11 +00:00
|
|
|
global->modules = modules;
|
2018-12-06 14:23:15 +00:00
|
|
|
}
|
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
#endif /* ODYSSEY_GLOBAL_H */
|