pub async fn process_run_request<O>(
    out: std::sync::Arc<O>,
    opt: RunRequestOpt,
) -> Result<(), CliError>
where
    O: Terminal,
{
    let kf_config = KfConfig::new(opt.kf, opt.profile)?;
    let mut kf_server = kf_config.connect().await?;
    let mut client = kf_server.mut_client();
    let file = opt.details_file.to_path_buf();

    match opt.request {
        RequestApi::ApiVersions => pretty_send!(out, KfApiVersionsRequest, client, file).await,
        RequestApi::ListOffset => pretty_send!(out, KfListOffsetRequest, client, file).await,
        RequestApi::Metadata => pretty_send!(out, KfMetadataRequest, client, file).await,
        RequestApi::LeaderAndIsr => pretty_send!(out, KfLeaderAndIsrRequest, client, file).await,
        RequestApi::FindCoordinator => {
            pretty_send!(out, KfFindCoordinatorRequest, client, file).await
        }
        RequestApi::JoinGroup => pretty_send!(out, KfJoinGroupRequest, client, file).await,
        RequestApi::SyncGroup => pretty_send!(out, KfSyncGroupRequest, client, file).await,
        RequestApi::LeaveGroup => pretty_send!(out, KfLeaveGroupRequest, client, file).await,
        RequestApi::DescribeGroups => {
            pretty_send!(out, KfDescribeGroupsRequest, client, file).await
        }
        RequestApi::ListGroups => pretty_send!(out, KfListGroupsRequest, client, file).await,
        RequestApi::DeleteGroups => pretty_send!(out, KfDeleteGroupsRequest, client, file).await,
        RequestApi::Heartbeat => pretty_send!(out, KfHeartbeatRequest, client, file).await,
        RequestApi::OffsetFetch => pretty_send!(out, KfOffsetFetchRequest, client, file).await,
    }
}
/// Parse CLI, build server address, run request & display result
Parse CLI, build server address, run request & display result
Parse CLI build server address run request & display result
pub async fn process_run_request<O>(
    out: std::sync::Arc<O>,
    opt: RunRequestOpt,
) -> Result<(), CliError>
where
    O: Terminal,
{
    let kf_config = KfConfig::new(opt.kf, opt.profile)?;
    let mut kf_server = kf_config.connect().await?;
    let mut client = kf_server.mut_client();
    let file = opt.details_file.to_path_buf();
    match opt.request {
        RequestApi::ApiVersions => pretty_send!(out, KfApiVersionsRequest, client, file).await,
        RequestApi::ListOffset => pretty_send!(out, KfListOffsetRequest, client, file).await,
        RequestApi::Metadata => pretty_send!(out, KfMetadataRequest, client, file).await,
        RequestApi::LeaderAndIsr => pretty_send!(out, KfLeaderAndIsrRequest, client, file).await,
        RequestApi::FindCoordinator => {
            pretty_send!(out, KfFindCoordinatorRequest, client, file).await
        }
        RequestApi::JoinGroup => pretty_send!(out, KfJoinGroupRequest, client, file).await,
        RequestApi::SyncGroup => pretty_send!(out, KfSyncGroupRequest, client, file).await,
        RequestApi::LeaveGroup => pretty_send!(out, KfLeaveGroupRequest, client, file).await,
        RequestApi::DescribeGroups => {
            pretty_send!(out, KfDescribeGroupsRequest, client, file).await
        }
        RequestApi::ListGroups => pretty_send!(out, KfListGroupsRequest, client, file).await,
        RequestApi::DeleteGroups => pretty_send!(out, KfDeleteGroupsRequest, client, file).await,
        RequestApi::Heartbeat => pretty_send!(out, KfHeartbeatRequest, client, file).await,
        RequestApi::OffsetFetch => pretty_send!(out, KfOffsetFetchRequest, client, file).await,
    }
}
pub async fn process_run_request < O > ( out : std :: sync :: Arc < O > , opt : RunRequestOpt , ) -> Result < ( ) , CliError > where O : Terminal , { let kf_config = KfConfig :: new ( opt . kf , opt . profile ) ? ; let mut kf_server = kf_config . connect ( ) . await ? ; let mut client = kf_server . mut_client ( ) ; let file = opt . details_file . to_path_buf ( ) ; match opt . request { RequestApi :: ApiVersions => pretty_send ! ( out KfApiVersionsRequest client file ) . await , RequestApi :: ListOffset => pretty_send ! ( out KfListOffsetRequest client file ) . await , RequestApi :: Metadata => pretty_send ! ( out KfMetadataRequest client file ) . await , RequestApi :: LeaderAndIsr => pretty_send ! ( out KfLeaderAndIsrRequest client file ) . await , RequestApi :: FindCoordinator => { pretty_send ! ( out KfFindCoordinatorRequest client file ) . await } RequestApi :: JoinGroup => pretty_send ! ( out KfJoinGroupRequest client file ) . await , RequestApi :: SyncGroup => pretty_send ! ( out KfSyncGroupRequest client file ) . await , RequestApi :: LeaveGroup => pretty_send ! ( out KfLeaveGroupRequest client file ) . await , RequestApi :: DescribeGroups => { pretty_send ! ( out KfDescribeGroupsRequest client file ) . await } RequestApi :: ListGroups => pretty_send ! ( out KfListGroupsRequest client file ) . await , RequestApi :: DeleteGroups => pretty_send ! ( out KfDeleteGroupsRequest client file ) . await , RequestApi :: Heartbeat => pretty_send ! ( out KfHeartbeatRequest client file ) . await , RequestApi :: OffsetFetch => pretty_send ! ( out KfOffsetFetchRequest client file ) . await , } }
Parse CLI, build server address, run request & display result
Parse CLI build server address run request & display result
out
std::sync::Arc<O>
opt
RunRequestOpt
out
std::sync::Arc<O>
opt
RunRequestOpt