pub struct AdminServiceClient<T> { /* private fields */ }
Expand description
A service that provides administrative functionality.
Implementations§
Source§impl<T> AdminServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AdminServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdminServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn add_jobs(
&mut self,
request: impl IntoRequest<AddJobsRequest>,
) -> Result<Response<AddJobsResponse>, Status>
pub async fn add_jobs( &mut self, request: impl IntoRequest<AddJobsRequest>, ) -> Result<Response<AddJobsResponse>, Status>
Add jobs to be executed.
Sourcepub async fn add_job_if_not_exists(
&mut self,
request: impl IntoRequest<AddJobIfNotExistsRequest>,
) -> Result<Response<AddJobIfNotExistsResponse>, Status>
pub async fn add_job_if_not_exists( &mut self, request: impl IntoRequest<AddJobIfNotExistsRequest>, ) -> Result<Response<AddJobIfNotExistsResponse>, Status>
Add a job or return the first job that matches the given filter.
This is semantically equivalent to sending a CountJobs
request
and adding the job if the count is 0.
The difference is that this method is atomic thus it is
not possible for another client to add the same job
between the CountJobs
and AddJobs
calls.
Sourcepub async fn list_jobs(
&mut self,
request: impl IntoRequest<ListJobsRequest>,
) -> Result<Response<ListJobsResponse>, Status>
pub async fn list_jobs( &mut self, request: impl IntoRequest<ListJobsRequest>, ) -> Result<Response<ListJobsResponse>, Status>
List jobs.
Sourcepub async fn count_jobs(
&mut self,
request: impl IntoRequest<CountJobsRequest>,
) -> Result<Response<CountJobsResponse>, Status>
pub async fn count_jobs( &mut self, request: impl IntoRequest<CountJobsRequest>, ) -> Result<Response<CountJobsResponse>, Status>
Count the number of jobs.
Sourcepub async fn list_job_types(
&mut self,
request: impl IntoRequest<ListJobTypesRequest>,
) -> Result<Response<ListJobTypesResponse>, Status>
pub async fn list_job_types( &mut self, request: impl IntoRequest<ListJobTypesRequest>, ) -> Result<Response<ListJobTypesResponse>, Status>
List all job types.
Sourcepub async fn cancel_jobs(
&mut self,
request: impl IntoRequest<CancelJobsRequest>,
) -> Result<Response<CancelJobsResponse>, Status>
pub async fn cancel_jobs( &mut self, request: impl IntoRequest<CancelJobsRequest>, ) -> Result<Response<CancelJobsResponse>, Status>
Cancel jobs.
Sourcepub async fn delete_inactive_jobs(
&mut self,
request: impl IntoRequest<DeleteInactiveJobsRequest>,
) -> Result<Response<DeleteInactiveJobsResponse>, Status>
pub async fn delete_inactive_jobs( &mut self, request: impl IntoRequest<DeleteInactiveJobsRequest>, ) -> Result<Response<DeleteInactiveJobsResponse>, Status>
Delete inactive jobs from storage.
Sourcepub async fn list_executors(
&mut self,
request: impl IntoRequest<ListExecutorsRequest>,
) -> Result<Response<ListExecutorsResponse>, Status>
pub async fn list_executors( &mut self, request: impl IntoRequest<ListExecutorsRequest>, ) -> Result<Response<ListExecutorsResponse>, Status>
Get information about the executors.
Sourcepub async fn create_schedules(
&mut self,
request: impl IntoRequest<CreateSchedulesRequest>,
) -> Result<Response<CreateSchedulesResponse>, Status>
👎Deprecated
pub async fn create_schedules( &mut self, request: impl IntoRequest<CreateSchedulesRequest>, ) -> Result<Response<CreateSchedulesResponse>, Status>
Create schedules.
Deprecated: use AddSchedules
instead.
Sourcepub async fn add_schedules(
&mut self,
request: impl IntoRequest<AddSchedulesRequest>,
) -> Result<Response<AddSchedulesResponse>, Status>
pub async fn add_schedules( &mut self, request: impl IntoRequest<AddSchedulesRequest>, ) -> Result<Response<AddSchedulesResponse>, Status>
Add schedules.
Sourcepub async fn add_schedule_if_not_exists(
&mut self,
request: impl IntoRequest<AddScheduleIfNotExistsRequest>,
) -> Result<Response<AddScheduleIfNotExistsResponse>, Status>
pub async fn add_schedule_if_not_exists( &mut self, request: impl IntoRequest<AddScheduleIfNotExistsRequest>, ) -> Result<Response<AddScheduleIfNotExistsResponse>, Status>
Add a schedule or return the first schedule that matches the given filter.
This is semantically equivalent to sending a CountSchedules
request
and adding the schedule if the count is 0.
The difference is that this method is atomic thus it is
not possible for another client to add the same schedule
between the CountSchedules
and CreateSchedules
calls.
Sourcepub async fn list_schedules(
&mut self,
request: impl IntoRequest<ListSchedulesRequest>,
) -> Result<Response<ListSchedulesResponse>, Status>
pub async fn list_schedules( &mut self, request: impl IntoRequest<ListSchedulesRequest>, ) -> Result<Response<ListSchedulesResponse>, Status>
List schedules.
Sourcepub async fn count_schedules(
&mut self,
request: impl IntoRequest<CountSchedulesRequest>,
) -> Result<Response<CountSchedulesResponse>, Status>
pub async fn count_schedules( &mut self, request: impl IntoRequest<CountSchedulesRequest>, ) -> Result<Response<CountSchedulesResponse>, Status>
Count the number of schedules.
Sourcepub async fn cancel_schedules(
&mut self,
request: impl IntoRequest<CancelSchedulesRequest>,
) -> Result<Response<CancelSchedulesResponse>, Status>
pub async fn cancel_schedules( &mut self, request: impl IntoRequest<CancelSchedulesRequest>, ) -> Result<Response<CancelSchedulesResponse>, Status>
Cancel schedules.
Sourcepub async fn delete_inactive_schedules(
&mut self,
request: impl IntoRequest<DeleteInactiveSchedulesRequest>,
) -> Result<Response<DeleteInactiveSchedulesResponse>, Status>
pub async fn delete_inactive_schedules( &mut self, request: impl IntoRequest<DeleteInactiveSchedulesRequest>, ) -> Result<Response<DeleteInactiveSchedulesResponse>, Status>
Delete inactive schedules from storage.
Trait Implementations§
Source§impl<T: Clone> Clone for AdminServiceClient<T>
impl<T: Clone> Clone for AdminServiceClient<T>
Source§fn clone(&self) -> AdminServiceClient<T>
fn clone(&self) -> AdminServiceClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for AdminServiceClient<T>
impl<T> RefUnwindSafe for AdminServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for AdminServiceClient<T>where
T: Send,
impl<T> Sync for AdminServiceClient<T>where
T: Sync,
impl<T> Unpin for AdminServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for AdminServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request