|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Resolves the runtime apps directory, fingerprints it for reload detection, logs startup state, and matches requests to mounted apps. More...
#include "native_runtime_stack.h"#include "native_app_config.h"#include "native_json_config.h"#include "native_support.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <unistd.h>Go to the source code of this file.
Macros | |
| #define | PHAROS_RUNTIME_STACK_VERSION "0.7.23" |
| #define | native_runtime_stack_strdup strdup |
Functions | |
| static char * | shell_quote_runtime_stack_native (const char *value) |
| char * | runtime_apps_dir_native (const char *conf_path) |
| Resolves the apps directory configured for a runtime config file. | |
| char * | runtime_apps_fingerprint_native (const char *apps_dir) |
| Builds a fingerprint string describing the current runtime apps directory state. | |
| static void | runtime_loaded_app_context_native (const AppRuntime *app, char *buffer, size_t buffer_len) |
| void | runtime_log_banner_native (const RuntimeStack *stack, const ServeConfig *config, long load_ms) |
| Emits a startup banner describing the loaded runtime stack. | |
| AppRuntime * | runtime_match_app_native (RuntimeStack *stack, const char *path) |
| Finds the loaded app runtime that should handle a request path. | |
Resolves the runtime apps directory, fingerprints it for reload detection, logs startup state, and matches requests to mounted apps.
Definition in file native_runtime_stack.c.
| #define native_runtime_stack_strdup strdup |
Definition at line 25 of file native_runtime_stack.c.
Referenced by shell_quote_runtime_stack_native().
| #define PHAROS_RUNTIME_STACK_VERSION "0.7.23" |
Definition at line 13 of file native_runtime_stack.c.
Referenced by runtime_log_banner_native().
| char * runtime_apps_dir_native | ( | const char * | conf_path | ) |
Resolves the apps directory configured for a runtime config file.
| conf_path | Runtime config file path. |
Definition at line 62 of file native_runtime_stack.c.
References conf_lookup_value(), current_working_directory(), and resolve_conf_relative_path_native().
Referenced by handle_native_runtime_command(), and serve_runtime_stack_native().
| char * runtime_apps_fingerprint_native | ( | const char * | apps_dir | ) |
Builds a fingerprint string describing the current runtime apps directory state.
| apps_dir | Directory containing discoverable apps. |
Definition at line 78 of file native_runtime_stack.c.
References dup_range(), len, and shell_quote_runtime_stack_native().
Referenced by serve_runtime_stack_native().
|
static |
Definition at line 115 of file native_runtime_stack.c.
References AppRuntime::app_id, and AppRuntime::base_path.
Referenced by runtime_log_banner_native().
| void runtime_log_banner_native | ( | const RuntimeStack * | stack, |
| const ServeConfig * | config, | ||
| long | load_ms ) |
Emits a startup banner describing the loaded runtime stack.
| stack | Loaded runtime stack. |
| config | Active serve configuration. |
| load_ms | Milliseconds spent loading the runtime stack. |
Definition at line 127 of file native_runtime_stack.c.
References RuntimeStack::apps, buffer_append(), buffer_free(), buffer_init(), RuntimeStack::count, Buffer::data, ServeConfig::host, Buffer::len, PHAROS_RUNTIME_STACK_VERSION, runtime_loaded_app_context_native(), and ServeConfig::socket_path.
Referenced by serve_runtime_stack_native().
| AppRuntime * runtime_match_app_native | ( | RuntimeStack * | stack, |
| const char * | path ) |
Finds the loaded app runtime that should handle a request path.
| stack | Runtime stack to search. |
| path | Normalized request path. |
Definition at line 162 of file native_runtime_stack.c.
References RuntimeStack::apps, AppRuntime::base_path, RuntimeStack::count, and starts_with().
Referenced by serve_runtime_stack_native().
|
static |
Definition at line 28 of file native_runtime_stack.c.
References len, and native_runtime_stack_strdup.
Referenced by runtime_apps_fingerprint_native().