config.h¶
The config.h module represents runtime configuration options as outlined in
Configuration. Refer to that document for more details on what each option
means.
API¶
-
typedef struct lua_State mn_lua_t¶
An alias to the
lua_Stateobject provided by Lua.
-
enum mn_event_loop¶
The event loop to use. Currently the only supported value is
MN_EVENT_LOOP_POLL.-
unsigned int MN_EVENT_LOOP_POLL = 0¶
-
unsigned int MN_EVENT_LOOP_POLL = 0¶
-
struct mn_config¶
Configuration options supplied to the
mn_serveron initialization.-
unsigned long long coro_pages¶
A reference to the COROUTINE_PAGES option.
-
enum mn_event_loop ev_loop¶
A reference to the EVENT_LOOP option.
-
enum mn_log_level log_level¶
A reference to the LOG_LEVEL option.
-
unsigned long long coro_pages¶
- struct mn_status mn_config_load(
- struct mn_config out[static const 1]
Loads the default configuration.
If successful, the out parameter must be cleaned up using
mn_config_unload().- Parameters:
out – The
mn_configreference to load.
- Returns:
- Aborts:
If space for
MN_REQUEST_MAX_CAPTUREScould not be allocated.
- struct mn_status mn_config_load_with( )¶
Loads the default configuration and then applies any overridden configuration options as defined in the file at path.
If successful, the out parameter must be cleaned up using
mn_config_unload().- Parameters:
path – The location of a lua file to execute.
out – The
mn_configreference to load.
- Returns:
- Aborts:
If space for
MN_REQUEST_MAX_CAPTUREScould not be allocated.
-
void mn_config_unload(struct mn_config c[static const 1])¶
Unloads a configuration object.
Should be called once you are finished using a
mn_configobject that was successfully loaded by a call tomn_config_load()ormn_config_load_with().- Parameters:
c – The configuration to unload.