feat: implement websocket_url as a get/set-able global parameter w/ value computation (#8553)

automerge
This commit is contained in:
mergify[bot]
2020-03-01 01:09:09 -08:00
committed by GitHub
parent f2fda14333
commit d6e7cbd4e8
5 changed files with 193 additions and 77 deletions

View File

@@ -18,13 +18,15 @@ lazy_static! {
#[derive(Serialize, Deserialize, Default, Debug, PartialEq)]
pub struct Config {
pub url: String,
pub websocket_url: String,
pub keypair_path: String,
}
impl Config {
pub fn new(url: &str, keypair_path: &str) -> Self {
pub fn new(url: &str, websocket_url: &str, keypair_path: &str) -> Self {
Self {
url: url.to_string(),
websocket_url: websocket_url.to_string(),
keypair_path: keypair_path.to_string(),
}
}