Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_runtime_reports.h File Reference

Declares builders for native runtime report payloads. More...

Go to the source code of this file.

Functions

Runtime report helpers
char * build_native_runtime_build_report_json (const char *target_id, const char *conf_path, const char *apps_dir, size_t app_count)
 Builds a JSON report describing a native runtime build result.
char * build_native_runtime_status_report_json (const RuntimeStack *stack, const char *apps_dir)
 Builds a JSON status report for a loaded runtime stack.
char * build_native_app_runtime_report_json (const char *report_id, const char *verb, const char *host_target, const char *host_mode, const char *artifact_dir, const AppRuntime *app)
 Builds a JSON runtime report for one app artifact and host surface.

Detailed Description

Declares builders for native runtime report payloads.

Definition in file native_runtime_reports.h.

Function Documentation

◆ build_native_app_runtime_report_json()

char * build_native_app_runtime_report_json ( const char * report_id,
const char * verb,
const char * host_target,
const char * host_mode,
const char * artifact_dir,
const AppRuntime * app )

Builds a JSON runtime report for one app artifact and host surface.

Parameters
report_idStable report identifier.
verbReport verb such as status or build.
host_targetHost target label to report.
host_modeHost mode label to report.
artifact_dirActive artifact directory for the app.
appFinalized app runtime to summarize.
Returns
Newly allocated JSON report text, or NULL on failure.

Definition at line 38 of file native_runtime_reports.c.

References AppRuntime::app_id, AppRuntime::app_root, AppRuntime::base_path, AppRuntime::build_dir, AppRuntime::compiled_entrypoint, AppRuntime::debug, AppRuntime::error_report_path, AppRuntime::host_profile, json_string_dup_native(), AppRuntime::log_format, AppRuntime::log_path, AppRuntime::runtime_conf_path, and AppRuntime::state_path.

Referenced by build_native_app_doctor_report_local_json(), and handle_native_runtime_app_command().

◆ build_native_runtime_build_report_json()

char * build_native_runtime_build_report_json ( const char * target_id,
const char * conf_path,
const char * apps_dir,
size_t app_count )

Builds a JSON report describing a native runtime build result.

Parameters
target_idRuntime target identifier.
conf_pathRuntime config file path.
apps_dirResolved apps directory.
app_countNumber of apps included in the runtime.
Returns
Newly allocated JSON report text, or NULL on failure.

Definition at line 15 of file native_runtime_reports.c.

References json_string_dup_native().

Referenced by handle_native_runtime_command().

◆ build_native_runtime_status_report_json()

char * build_native_runtime_status_report_json ( const RuntimeStack * stack,
const char * apps_dir )

Builds a JSON status report for a loaded runtime stack.

Parameters
stackLoaded runtime stack to summarize.
apps_dirRuntime apps directory represented by the stack.
Returns
Newly allocated JSON report text, or NULL on failure.

Definition at line 124 of file native_runtime_reports.c.

References AppRuntime::app_id, AppRuntime::app_root, RuntimeStack::apps, AppRuntime::base_path, buffer_append(), buffer_free(), buffer_init(), AppRuntime::build_dir, AppRuntime::compiled_entrypoint, RuntimeStack::count, Buffer::data, AppRuntime::debug, AppRuntime::error_report_path, RuntimeStack::host, AppRuntime::host_profile, json_string_dup_native(), Buffer::len, AppRuntime::log_format, AppRuntime::log_path, RuntimeStack::port, RuntimeStack::socket_path, and AppRuntime::state_path.

Referenced by handle_native_runtime_command().