refactor(cli): Make some run params reusable (#13870)

* refactor: extract TelemetryParams and PrometheusParams

* improve run_cmd docs

* extract `RuntimeParams`

* use `normalize`

* keep params types same style

* improve `max_runtime_instances`

* fmt

* add license and improve code

* Update client/cli/src/params/runtime_params.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
yjh
2023-04-25 16:18:35 +08:00
committed by GitHub
parent b46a512e1a
commit bcf7601169
9 changed files with 210 additions and 103 deletions
+5 -2
View File
@@ -22,8 +22,11 @@ mod message_params;
mod network_params;
mod node_key_params;
mod offchain_worker_params;
mod prometheus_params;
mod pruning_params;
mod runtime_params;
mod shared_params;
mod telemetry_params;
mod transaction_pool_params;
use crate::arg_enums::{CryptoScheme, OutputType};
@@ -37,8 +40,8 @@ use std::{fmt::Debug, str::FromStr};
pub use crate::params::{
database_params::*, import_params::*, keystore_params::*, message_params::*, network_params::*,
node_key_params::*, offchain_worker_params::*, pruning_params::*, shared_params::*,
transaction_pool_params::*,
node_key_params::*, offchain_worker_params::*, prometheus_params::*, pruning_params::*,
runtime_params::*, shared_params::*, telemetry_params::*, transaction_pool_params::*,
};
/// Parse Ss58AddressFormat