/// Process custom spu, converts spu spec to K8 and sends to KV store
Process custom spu, converts spu spec to K8 and sends to KV store
Process custom spu converts spu spec to K8 and sends to KV store
async fn process_custom_spu_request<C>(
    ctx: &PublicContext<C>,
    group_req: FlvCreateSpuGroupRequest,
) -> FlvResponseMessage
where
    C: MetadataClient,
{
    let (name, spg_spec): (String, SpuGroupSpec) = group_req.to_spec();
    match ctx.create(name.clone(), spg_spec).await {
        Ok(_) => FlvResponseMessage::new_ok(name.clone()),
        Err(err) => {
            let error = Some(err.to_string());
            FlvResponseMessage::new(name, FlvErrorCode::SpuError, error)
        }
    }
}
async fn process_custom_spu_request < C > ( ctx : & PublicContext < C > , group_req : FlvCreateSpuGroupRequest , ) -> FlvResponseMessage where C : MetadataClient , { let ( name , spg_spec ) : ( String , SpuGroupSpec ) = group_req . to_spec ( ) ; match ctx . create ( name . clone ( ) , spg_spec ) . await { Ok ( _ ) => FlvResponseMessage :: new_ok ( name . clone ( ) ) , Err ( err ) => { let error = Some ( err . to_string ( ) ) ; FlvResponseMessage :: new ( name , FlvErrorCode :: SpuError , error ) } } }
Process custom spu, converts spu spec to K8 and sends to KV store
Process custom spu converts spu spec to K8 and sends to KV store
ctx
&PublicContext<C>
group_req
FlvCreateSpuGroupRequest