/// Process topic, converts topic spec to K8 and sends to KV store
Process topic, converts topic spec to K8 and sends to KV store
Process topic converts topic spec to K8 and sends to KV store
async fn process_topic_request<C>(
    ctx: &PublicContext<C>,
    name: String,
    topic_spec: TopicSpec,
) -> FlvResponseMessage
where
    C: MetadataClient,
{
    if let Err(err) = create_topic(ctx, name.clone(), topic_spec).await {
        let error = Some(err.to_string());
        FlvResponseMessage::new(name, FlvErrorCode::TopicError, error)
    } else {
        FlvResponseMessage::new_ok(name)
    }
}
async fn process_topic_request < C > ( ctx : & PublicContext < C > , name : String , topic_spec : TopicSpec , ) -> FlvResponseMessage where C : MetadataClient , { if let Err ( err ) = create_topic ( ctx , name . clone ( ) , topic_spec ) . await { let error = Some ( err . to_string ( ) ) ; FlvResponseMessage :: new ( name , FlvErrorCode :: TopicError , error ) } else { FlvResponseMessage :: new_ok ( name ) } }
Process topic, converts topic spec to K8 and sends to KV store
Process topic converts topic spec to K8 and sends to KV store
ctx
&PublicContext<C>
name
String
topic_spec
TopicSpec