use crate::client::TrellisClientError;
pub struct JobsClient<'a> {
inner: &'a crate::client::TrellisClient,
}
impl<'a> JobsClient<'a> {
pub fn new(inner: &'a crate::client::TrellisClient) -> Self {
Self { inner }
}
#[allow(dead_code)]
pub(crate) fn inner(&self) -> &'a crate::client::TrellisClient {
self.inner
}
pub fn rpc(&self) -> Rpc<'a> {
Rpc { _inner: self.inner }
}
pub fn event(&self) -> Event<'a> {
Event { _inner: self.inner }
}
pub fn feed(&self) -> Feed<'a> {
Feed { _inner: self.inner }
}
pub fn operation(&self) -> Operation<'a> {
Operation { _inner: self.inner }
}
}
pub struct Rpc<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Rpc<'a> {
pub fn jobs(&self) -> JobsRpc<'a> {
JobsRpc { inner: self._inner }
}
}
pub struct JobsRpc<'a> {
inner: &'a crate::client::TrellisClient,
}
impl<'a> JobsRpc<'a> {
pub async fn cancel(
&self,
input: &super::types::JobsCancelRequest,
) -> Result<super::types::JobsCancelResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsCancelRpc>(input).await
}
pub async fn dismiss_dlq(
&self,
input: &super::types::JobsDismissDLQRequest,
) -> Result<super::types::JobsDismissDLQResponse, TrellisClientError> {
self.inner
.call::<super::rpc::JobsDismissDLQRpc>(input)
.await
}
pub async fn get(
&self,
input: &super::types::JobsGetRequest,
) -> Result<super::types::JobsGetResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsGetRpc>(input).await
}
pub async fn health(&self) -> Result<super::types::JobsHealthResponse, TrellisClientError> {
self.inner
.call::<super::rpc::JobsHealthRpc>(&super::rpc::Empty {})
.await
}
pub async fn list(
&self,
input: &super::types::JobsListRequest,
) -> Result<super::types::JobsListResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsListRpc>(input).await
}
pub async fn list_dlq(
&self,
input: &super::types::JobsListDLQRequest,
) -> Result<super::types::JobsListDLQResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsListDLQRpc>(input).await
}
pub async fn list_services(
&self,
input: &super::types::JobsListServicesRequest,
) -> Result<super::types::JobsListServicesResponse, TrellisClientError> {
self.inner
.call::<super::rpc::JobsListServicesRpc>(input)
.await
}
pub async fn replay_dlq(
&self,
input: &super::types::JobsReplayDLQRequest,
) -> Result<super::types::JobsReplayDLQResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsReplayDLQRpc>(input).await
}
pub async fn retry(
&self,
input: &super::types::JobsRetryRequest,
) -> Result<super::types::JobsRetryResponse, TrellisClientError> {
self.inner.call::<super::rpc::JobsRetryRpc>(input).await
}
}
pub struct Event<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Event<'a> {}
pub struct Feed<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Feed<'a> {}
pub struct Operation<'a> {
pub(crate) _inner: &'a crate::client::TrellisClient,
}
impl<'a> Operation<'a> {}