use super::WorkersTail;
use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiSuccess;
#[derive(Debug)]
pub struct SendTailHeartbeat<'a> {
pub account_identifier: &'a str,
pub script_name: &'a str,
pub tail_id: &'a str,
}
impl EndpointSpec for SendTailHeartbeat<'_> {
type JsonResponse = WorkersTail;
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::POST
}
fn path(&self) -> String {
format!(
"accounts/{}/workers/scripts/{}/tails/{}/heartbeat",
self.account_identifier, self.script_name, self.tail_id
)
}
}