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

Declares helpers for parsing and normalizing native serve configuration. More...

Go to the source code of this file.

Functions

Serve configuration helpers
int parse_serve_config_native (int argc, char **argv, ServeConfig *config)
 Parses native serve CLI arguments into a serve configuration record.
void free_serve_config_native (ServeConfig *config)
 Releases heap-owned fields in a serve configuration record.
void apply_serve_config_defaults_from_conf_native (ServeConfig *config)
 Applies runtime-config-derived default values to an already parsed serve config.

Detailed Description

Declares helpers for parsing and normalizing native serve configuration.

Definition in file native_serve_config.h.

Function Documentation

◆ apply_serve_config_defaults_from_conf_native()

void apply_serve_config_defaults_from_conf_native ( ServeConfig * config)

Applies runtime-config-derived default values to an already parsed serve config.

Parameters
configConfiguration record to normalize in place.

Definition at line 130 of file native_serve_config.c.

References conf_lookup_value(), ServeConfig::conf_path, current_working_directory(), ServeConfig::host, native_serve_config_strdup, path_dirname(), ServeConfig::port, resolve_relative_to(), ServeConfig::socket_path, and streq().

Referenced by handle_serve().

◆ free_serve_config_native()

◆ parse_serve_config_native()

int parse_serve_config_native ( int argc,
char ** argv,
ServeConfig * config )

Parses native serve CLI arguments into a serve configuration record.

Parameters
argcArgument count for the serve command.
argvArgument vector for the serve command.
configDestination configuration record to populate.
Returns
0 on success, or a non-zero status code on parse failure.

Definition at line 20 of file native_serve_config.c.

References ServeConfig::app_dir, ServeConfig::base_path, ServeConfig::build_dir, ServeConfig::conf_path, ServeConfig::debug, ServeConfig::host, ServeConfig::kind, ServeConfig::log_path, native_serve_config_strdup, ServeConfig::port, ServeConfig::root, ServeConfig::seed_state, ServeConfig::socket_path, ServeConfig::state_dir, ServeConfig::state_path, streq(), and ServeConfig::target_id.

Referenced by handle_native_runtime_command(), handle_serve(), and parse_native_app_ops_config().