#include "config.h"
#include <signal.h>
#include "daemon/cfg.h"
#include "cmdhandler.h"
#include "scheduler/task.h"
#include "scheduler/schedule.h"
#include "db/db_configuration.h"
#include "db/db_connection.h"
Go to the source code of this file.
◆ engine_type
The engine.
Definition at line 1 of file engine.h.
◆ start_cb_t
◆ engine_alloc()
Create engine.
Definition at line 79 of file engine.c.
◆ engine_dealloc()
◆ engine_init()
void engine_init |
( |
engine_type * |
engine, |
|
|
int |
daemonize |
|
) |
| |
◆ engine_run()
Run the engine after setting it up using engine_setup. When this function returns the runloop has finished and the engine is ready to stop.
- Parameters
-
[in] | engine | the engine returned from engine_start |
[in] | single_run | run once |
- Returns
- 0 if terminated normally, 1 on unrecoverable error.
Run engine, run!.
Definition at line 644 of file engine.c.
◆ engine_setup()
ods_status engine_setup |
( |
void |
| ) |
|
Setup the engine started by engine_create
- Parameters
-
[in] | engine | the engine returned from engine_start |
[in] | commands | NULL terminated list of command functions for the engine that the command handler can run. |
[in] | help | NULL terminated list of help functions that print help for the command to a socket. |
Set up engine and return the setup status.
Definition at line 432 of file engine.c.
◆ engine_start_workers()
start all workers.
- Parameters
-
Definition at line 174 of file engine.c.
◆ engine_stop()
Stop the engine after engine_runloop returns.
- Parameters
-
◆ engine_stop_workers()
signal all workers to stop. Blocks until all workers are joined.
- Parameters
-
Definition at line 193 of file engine.c.
◆ engine_teardown()
Clean up engine.
- Parameters
-
Clean up engine.
Definition at line 585 of file engine.c.
◆ engine_wakeup_workers()
Wake up workers.
- Parameters
-
Wake up all workers.
Definition at line 218 of file engine.c.
◆ get_database_connection()
Try to open a connection to the database.
- Parameters
-
engine,the | engine containing database configuration |
- Returns
- connection on success, NULL on failure.
Definition at line 226 of file engine.c.