|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Finalizes loaded app runtime records by applying serve overrides and resolving effective runtime paths. More...
#include "native_app_runtime_finalize.h"#include "native_app_runtime_paths.h"#include "native_app_config.h"#include "native_support.h"#include <stdlib.h>#include <string.h>Go to the source code of this file.
Macros | |
| #define | native_runtime_finalize_strdup strdup |
Functions | |
| static void | free_finalize_fields (char *app_root, char *build_dir, char *state_path, char *base_path, char *log_path, char *log_format, char *error_report_path, char *debug, char *runtime_conf_path) |
| static char * | clone_or_empty_finalize (const char *value) |
| static int | has_override_value (const char *value) |
| static char * | finalize_state_path_native (const AppRuntime *app, const ServeConfig *config, const char *app_root, const char *build_dir) |
| static char * | finalize_base_path_native (const AppRuntime *app, const ServeConfig *config, const char *app_root) |
| static char * | finalize_log_path_native (const AppRuntime *app, const ServeConfig *config, const char *app_root) |
| static char * | finalize_log_format_native (const AppRuntime *app, const char *app_root) |
| static char * | finalize_error_report_path_native (const AppRuntime *app, const char *app_root) |
| static char * | finalize_debug_native (const AppRuntime *app, const ServeConfig *config, const char *app_root) |
| static char * | finalize_runtime_conf_path_native (const AppRuntime *app, const ServeConfig *config, const char *app_root) |
| char * | resolved_runtime_conf_path_from_config_native (const ServeConfig *config, const char *app_root) |
| Resolves the runtime configuration path that should apply to an app. | |
| int | finalize_loaded_app_runtime_native (AppRuntime *app, const ServeConfig *config, const char *app_root_override, const char *build_dir_override) |
| Applies overrides and derived runtime paths to a loaded app runtime record. | |
Finalizes loaded app runtime records by applying serve overrides and resolving effective runtime paths.
Definition in file native_app_runtime_finalize.c.
| #define native_runtime_finalize_strdup strdup |
Definition at line 18 of file native_app_runtime_finalize.c.
Referenced by clone_or_empty_finalize(), finalize_base_path_native(), finalize_debug_native(), finalize_error_report_path_native(), finalize_loaded_app_runtime_native(), finalize_log_format_native(), finalize_log_path_native(), finalize_runtime_conf_path_native(), finalize_state_path_native(), and resolved_runtime_conf_path_from_config_native().
|
static |
Definition at line 43 of file native_app_runtime_finalize.c.
References native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 67 of file native_app_runtime_finalize.c.
References AppRuntime::base_path, ServeConfig::base_path, effective_app_base_path_native(), has_override_value(), and native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 101 of file native_app_runtime_finalize.c.
References AppRuntime::debug, ServeConfig::debug, effective_app_debug_native(), has_override_value(), and native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 94 of file native_app_runtime_finalize.c.
References AppRuntime::app_id, effective_app_error_report_path_native(), AppRuntime::error_report_path, and native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
| int finalize_loaded_app_runtime_native | ( | AppRuntime * | app, |
| const ServeConfig * | config, | ||
| const char * | app_root_override, | ||
| const char * | build_dir_override ) |
Applies overrides and derived runtime paths to a loaded app runtime record.
| app | Runtime record to finalize in place. |
| config | Active serve configuration. |
| app_root_override | Optional app root override. |
| build_dir_override | Optional build directory override. |
Definition at line 141 of file native_app_runtime_finalize.c.
References AppRuntime::app_root, AppRuntime::base_path, AppRuntime::build_dir, clone_or_empty_finalize(), AppRuntime::debug, AppRuntime::error_report_path, finalize_base_path_native(), finalize_debug_native(), finalize_error_report_path_native(), finalize_log_format_native(), finalize_log_path_native(), finalize_runtime_conf_path_native(), finalize_state_path_native(), free_finalize_fields(), AppRuntime::log_format, AppRuntime::log_path, native_runtime_finalize_strdup, AppRuntime::runtime_conf_path, and AppRuntime::state_path.
Referenced by add_runtime_app_native(), handle_native_runtime_app_command(), load_app_runtime_for_single_app(), and prepare_finalized_app_from_config().
|
static |
Definition at line 87 of file native_app_runtime_finalize.c.
References effective_app_log_format_native(), has_override_value(), AppRuntime::log_format, and native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 77 of file native_app_runtime_finalize.c.
References AppRuntime::app_id, effective_app_log_path_native(), has_override_value(), AppRuntime::log_path, ServeConfig::log_path, and native_runtime_finalize_strdup.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 111 of file native_app_runtime_finalize.c.
References ServeConfig::conf_path, has_override_value(), native_runtime_finalize_strdup, resolved_runtime_conf_path_from_config_native(), and AppRuntime::runtime_conf_path.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 54 of file native_app_runtime_finalize.c.
References AppRuntime::app_id, effective_app_state_path_native(), has_override_value(), native_runtime_finalize_strdup, ServeConfig::state_dir, AppRuntime::state_path, and ServeConfig::state_path.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 21 of file native_app_runtime_finalize.c.
Referenced by finalize_loaded_app_runtime_native().
|
static |
Definition at line 50 of file native_app_runtime_finalize.c.
Referenced by finalize_base_path_native(), finalize_debug_native(), finalize_log_format_native(), finalize_log_path_native(), finalize_runtime_conf_path_native(), and finalize_state_path_native().
| char * resolved_runtime_conf_path_from_config_native | ( | const ServeConfig * | config, |
| const char * | app_root ) |
Resolves the runtime configuration path that should apply to an app.
| config | Active serve configuration. |
| app_root | Root directory of the app being finalized. |
Definition at line 121 of file native_app_runtime_finalize.c.
References app_local_conf_path_native(), ServeConfig::conf_path, current_working_directory(), native_runtime_finalize_strdup, and resolve_relative_to().
Referenced by finalize_runtime_conf_path_native().