/// Parse group coordinator response and generate Server Address
Parse group coordinator response and generate Server Address
Parse group coordinator response and generate Server Address
fn group_coordinator_to_socket_addr(
    coordinator_resp: &KfFindCoordinatorResponse,
) -> Result<String, CliError> {
    if coordinator_resp.error_code != KfErrorCode::None {
        return Err(CliError::IoError(IoError::new(
            ErrorKind::InvalidData,
            format!(
                "find group coordinator: {}",
                coordinator_resp.error_code.to_sentence()
            ),
        )));
    }
    let server_addr = ProfileConfig::host_port_to_socket_addr(&format!(
        "{}:{}",
        coordinator_resp.host, coordinator_resp.port
    ))?;
    debug!("group coordinator host/port: '{}'", server_addr);
    Ok(server_addr)
}
fn group_coordinator_to_socket_addr ( coordinator_resp : & KfFindCoordinatorResponse , ) -> Result < String , CliError > { if coordinator_resp . error_code != KfErrorCode :: None { return Err ( CliError :: IoError ( IoError :: new ( ErrorKind :: InvalidData , format ! ( " " coordinator_resp error_code to_sentence ( ) ) , ) ) ) ; } let server_addr = ProfileConfig :: host_port_to_socket_addr ( & format ! ( " " coordinator_resp host coordinator_resp port ) ) ? ; debug ! ( " " server_addr ) ; Ok ( server_addr ) }
Parse group coordinator response and generate Server Address
Parse group coordinator response and generate Server Address
coordinator_resp
&KfFindCoordinatorResponse