fn get_peer()

in src/plugin/plugin_amqplib.rs [113:128]


    fn get_peer(this: &mut ZObj) -> String {
        let Some(io) = this
            .get_property("connection")
            .as_z_obj()
            .and_then(|connection| connection.get_property("io").as_z_obj())
        else {
            return "unknown:0".to_owned();
        };
        let host = io
            .get_property("host")
            .as_z_str()
            .and_then(|s| s.to_str().ok())
            .unwrap_or("unknown");
        let port = io.get_property("port").as_long().unwrap_or_default();
        format!("{}:{}", host, port)
    }