/// Create message bus object with given parameters.
Create message bus object with given parameters.
Create message bus object with given parameters .
pub fn new(server: &str, node: &str, grpc_endpoint: &str) -> Self {
        Self {
            server: server.to_owned(),
            node: node.to_owned(),
            grpc_endpoint: grpc_endpoint.to_owned(),
            client: None,
            hb_interval: Duration::from_secs(
                match env::var("MAYASTOR_HB_INTERVAL") {
                    Ok(val) => match val.parse::<u64>() {
                        Ok(num) => num,
                        Err(_) => HB_INTERVAL,
                    },
                    Err(_) => HB_INTERVAL,
                },
            ),
        }
    }
pub fn new ( server : & str , node : & str , grpc_endpoint : & str ) -> Self { Self { server : server . to_owned ( ) , node : node . to_owned ( ) , grpc_endpoint : grpc_endpoint . to_owned ( ) , client : None , hb_interval : Duration :: from_secs ( match env :: var ( " " ) { Ok ( val ) => match val . parse :: < u64 > ( ) { Ok ( num ) => num , Err ( _ ) => HB_INTERVAL , } , Err ( _ ) => HB_INTERVAL , } , ) , } }
Create message bus object with given parameters.
Create message bus object with given parameters .
server
&str
node
&str
grpc_endpoint
&str