Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_runtime_stack.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Declares runtime stack helpers for app discovery, reload detection, and request matching.
4 */
5
6#ifndef PHAROS_NATIVE_RUNTIME_STACK_H
7#define PHAROS_NATIVE_RUNTIME_STACK_H
8
10
11/** @name Runtime stack helpers
12 * @{
13 */
14/**
15 * @brief Resolves the apps directory configured for a runtime config file.
16 * @param conf_path Runtime config file path.
17 * @return Newly allocated apps directory path, or NULL when it cannot be resolved.
18 */
19char *runtime_apps_dir_native(const char *conf_path);
20/**
21 * @brief Builds a fingerprint string describing the current runtime apps directory state.
22 * @param apps_dir Directory containing discoverable apps.
23 * @return Newly allocated fingerprint string, or NULL on failure.
24 */
25char *runtime_apps_fingerprint_native(const char *apps_dir);
26/**
27 * @brief Emits a startup banner describing the loaded runtime stack.
28 * @param stack Loaded runtime stack.
29 * @param config Active serve configuration.
30 * @param load_ms Milliseconds spent loading the runtime stack.
31 */
32void runtime_log_banner_native(const RuntimeStack *stack, const ServeConfig *config, long load_ms);
33/**
34 * @brief Finds the loaded app runtime that should handle a request path.
35 * @param stack Runtime stack to search.
36 * @param path Normalized request path.
37 * @return Pointer to the matching app runtime within stack, or NULL when no app matches.
38 */
39AppRuntime *runtime_match_app_native(RuntimeStack *stack, const char *path);
40
41
42/** @} */
43#endif
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.
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.
Defines shared native runtime data structures used across the Pharos C runtime.
Loaded runtime metadata for one Pharos app artifact.
In-memory collection of loaded app runtimes served by one listener.
Parsed native serve configuration used to bootstrap the runtime listener.