diff options
| author | 童宗振 <[email protected]> | 2024-04-16 09:57:09 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-04-16 09:57:09 +0000 |
| commit | 134ef8b0b14ef76c6c0fec7e998196b19e73722a (patch) | |
| tree | 4d77704cce1a6d6ad03be51441021392e8448296 /include/config.h | |
| parent | 1f413abebc4c2b8b7b6457a717a9d9d7c6b74ae7 (diff) | |
Adjust file path
Diffstat (limited to 'include/config.h')
| -rw-r--r-- | include/config.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h new file mode 100644 index 0000000..de8778d --- /dev/null +++ b/include/config.h @@ -0,0 +1,52 @@ +#pragma once +#include "common.h" + +#include <event.h> +#include <librdkafka/rdkafka.h> + +#include <limits.h> +#include <sched.h> +#include <stdint.h> + +struct config +{ + char absolute_path[PATH_MAX]; + + char config_path[PATH_MAX]; + char dy_config_path[PATH_MAX]; + char zlog_config_path[PATH_MAX]; + + cpu_set_t cpu_set_io; + + // device Information + char * sled_ip; + char device_group[MR_SYMBOL_MAX]; + + // kafka + char topic_name[MR_SYMBOL_MAX]; + char broker_list[1024]; + char sasl_username[MR_SYMBOL_MAX]; + char sasl_password[MR_SYMBOL_MAX]; + + // maat + unsigned int maat_log_level; + unsigned int maat_input_mode; + char table_schema[PATH_MAX]; + char json_cfg_file[PATH_MAX]; + + char redis_server[MR_SYMBOL_MAX]; + char redis_port_range[MR_SYMBOL_MAX]; + int redis_db_idx; + + // dp trace + char dp_trace_dir[PATH_MAX]; + unsigned int dp_trace_file_max_size_in_KB; + unsigned int dp_trace_merge_timeout; + struct dp_trace_job_desc desc[DP_TRACE_JOB_NUM_MAX]; +}; + +const struct config * config_create(const char * config_path, const char * dy_config_path); +const struct config * global_config_get(); +void global_config_destroy(); +void config_load(); +void dynamic_config_load_and_apply();
\ No newline at end of file |
