use surf::http::Method;
use super::WorkersTail;
use crate::framework::endpoint::Endpoint;
#[derive(Debug)]
pub struct SendTailHeartbeat<'a> {
pub account_identifier: &'a str,
pub script_name: &'a str,
pub tail_id: &'a str,
}
impl<'a> Endpoint<WorkersTail> for SendTailHeartbeat<'a> {
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
)
}
}