feature(adapt maat): delete iris mode
This commit is contained in:
@@ -318,7 +318,6 @@ out:
|
||||
|
||||
#define MAAT_INPUT_JSON 0
|
||||
#define MAAT_INPUT_REDIS 1
|
||||
#define MAAT_INPUT_FILE 2
|
||||
|
||||
static struct maat* maat_feather_create_with_override(const char * instance_name,
|
||||
const char * profile, const char * section, const char * override_section,
|
||||
@@ -327,7 +326,7 @@ static struct maat* maat_feather_create_with_override(const char * instance_name
|
||||
struct maat *target=NULL;
|
||||
int input_mode = 0, maat_stat_on = 0, maat_perf_on = 0;
|
||||
int ret = 0, effect_interval = 60, log_level=0;
|
||||
char table_info[TFE_STRING_MAX] = {0}, inc_cfg_dir[TFE_STRING_MAX] = {0}, ful_cfg_dir[TFE_STRING_MAX] = {0};
|
||||
char table_info[TFE_STRING_MAX] = {0};
|
||||
char redis_server[TFE_STRING_MAX] = {0};
|
||||
char redis_port_range[TFE_STRING_MAX] = {0};
|
||||
char accept_tags[TFE_STRING_MAX] = {0};
|
||||
@@ -365,8 +364,6 @@ static struct maat* maat_feather_create_with_override(const char * instance_name
|
||||
}
|
||||
|
||||
MESA_load_profile_int_def(profile, section, "maat_redis_db_index", &(redis_db_idx), 0);
|
||||
MESA_load_profile_string_def(profile, section, "inc_cfg_dir", inc_cfg_dir, sizeof(inc_cfg_dir), "");
|
||||
MESA_load_profile_string_def(profile, section, "full_cfg_dir", ful_cfg_dir, sizeof(ful_cfg_dir), "");
|
||||
|
||||
MESA_load_profile_string_def(profile, section, "stat_file", maat_stat_file, sizeof(maat_stat_file), "");
|
||||
MESA_load_profile_int_def(profile, section, "effect_interval_s", &(effect_interval), 60);
|
||||
@@ -376,8 +373,7 @@ static struct maat* maat_feather_create_with_override(const char * instance_name
|
||||
MESA_load_profile_string_def(profile, override_section, "stat_file", maat_stat_file, sizeof(maat_stat_file), maat_stat_file);
|
||||
|
||||
effect_interval *= 1000;//convert s to ms
|
||||
assert(strlen(inc_cfg_dir) != 0 || strlen(ful_cfg_dir) != 0 || strlen(redis_server) != 0
|
||||
|| strlen(json_cfg_file) != 0);
|
||||
assert(strlen(redis_server) != 0 || strlen(json_cfg_file) != 0);
|
||||
|
||||
struct maat_options *opts = maat_options_new();
|
||||
maat_options_set_logger(opts, "log/maat.log", (enum log_level)log_level);
|
||||
@@ -392,9 +388,6 @@ static struct maat* maat_feather_create_with_override(const char * instance_name
|
||||
case MAAT_INPUT_REDIS:
|
||||
maat_options_set_redis(opts, redis_server, redis_port_select, redis_db_idx);
|
||||
break;
|
||||
case MAAT_INPUT_FILE:
|
||||
maat_options_set_iris(opts, ful_cfg_dir, inc_cfg_dir);
|
||||
break;
|
||||
default: TFE_LOG_ERROR(logger, "Invalid MAAT Input Mode: %d.", input_mode);
|
||||
goto error_out;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user