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

This commit is contained in:
Sunny Gleason
2020-02-29 11:39:07 -05:00
committed by Michael Vines
parent 2a5605db24
commit db291234ed
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(),
}
}