// client hits this endpoint to say that they want to request a slot
// returns a JSON body with a request ID
client hits this endpoint to say that they want to request a slot
returns a JSON body with a request ID
client hits this endpoint to say that they want to request a slot returns a JSON body with a request ID
async fn post_enqueue(_auth: (), body: SlotRequestMessage) -> Result<impl Reply, Rejection> {
    if !CLIENT_VERSION_REQUIRED.matches(&body.client_version) {
        return Err(warp::reject::custom(ClientVersionMismatch));
    }
    let ts = Timestamp::from_unix(&*UUID_CONTEXT, 1497624119, 1234);
    let request_id = try_or_500!(Uuid::new_v1(ts, &UUID_NODE_ID));
    ENCODER_QUEUE.write().insert(
        request_id,
        RwLock::new(EncodeItem::new(body.options, body.video_info)),
    );
    Ok(warp::reply::with_status(
        warp::reply::json(&PostEnqueueResponse { request_id }),
        StatusCode::ACCEPTED,
    ))
}
async fn post_enqueue ( _auth : ( ) , body : SlotRequestMessage ) -> Result < impl Reply , Rejection > { if ! CLIENT_VERSION_REQUIRED . matches ( & body . client_version ) { return Err ( warp :: reject :: custom ( ClientVersionMismatch ) ) ; } let ts = Timestamp :: from_unix ( & * UUID_CONTEXT , 1497624119 , 1234 ) ; let request_id = try_or_500 ! ( Uuid new_v1 ( ts UUID_NODE_ID ) ) ; ENCODER_QUEUE . write ( ) . insert ( request_id , RwLock :: new ( EncodeItem :: new ( body . options , body . video_info ) ) , ) ; Ok ( warp :: reply :: with_status ( warp :: reply :: json ( & PostEnqueueResponse { request_id } ) , StatusCode :: ACCEPTED , ) ) }
client hits this endpoint to say that they want to request a slot
returns a JSON body with a request ID
client hits this endpoint to say that they want to request a slot returns a JSON body with a request ID
_auth
()
body
SlotRequestMessage