#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorConnectionRequest {
#[prost(message, optional, tag = "1")]
pub message: ::core::option::Option<ExecutorMessage>,
}
impl ::prost::Name for ExecutorConnectionRequest {
const NAME: &'static str = "ExecutorConnectionRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorConnectionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorConnectionRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorConnectionResponse {
#[prost(message, optional, tag = "1")]
pub message: ::core::option::Option<ServerMessage>,
}
impl ::prost::Name for ExecutorConnectionResponse {
const NAME: &'static str = "ExecutorConnectionResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorConnectionResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorConnectionResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorMessage {
#[prost(
oneof = "executor_message::ExecutorMessageKind",
tags = "1, 2, 3, 4, 5"
)]
pub executor_message_kind: ::core::option::Option<executor_message::ExecutorMessageKind>,
}
pub mod executor_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ExecutorMessageKind {
#[prost(message, tag = "1")]
Capabilities(super::ExecutorCapabilities),
#[prost(message, tag = "2")]
Heartbeat(super::ExecutorHeartbeat),
#[prost(message, tag = "3")]
ExecutionStarted(super::ExecutionStarted),
#[prost(message, tag = "4")]
ExecutionSucceeded(super::ExecutionSucceeded),
#[prost(message, tag = "5")]
ExecutionFailed(super::ExecutionFailed),
}
}
impl ::prost::Name for ExecutorMessage {
const NAME: &'static str = "ExecutorMessage";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorMessage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorMessage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorCapabilities {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub supported_job_types: ::prost::alloc::vec::Vec<super::super::common::v1::JobType>,
#[prost(uint32, tag = "3")]
pub max_concurrent_executions: u32,
}
impl ::prost::Name for ExecutorCapabilities {
const NAME: &'static str = "ExecutorCapabilities";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorCapabilities".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorCapabilities".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExecutorHeartbeat {}
impl ::prost::Name for ExecutorHeartbeat {
const NAME: &'static str = "ExecutorHeartbeat";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorHeartbeat".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorHeartbeat".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStarted {
#[prost(string, tag = "1")]
pub execution_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for ExecutionStarted {
const NAME: &'static str = "ExecutionStarted";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutionStarted".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutionStarted".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionSucceeded {
#[prost(string, tag = "1")]
pub execution_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub output_payload_json: ::prost::alloc::string::String,
}
impl ::prost::Name for ExecutionSucceeded {
const NAME: &'static str = "ExecutionSucceeded";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutionSucceeded".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutionSucceeded".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionFailed {
#[prost(string, tag = "1")]
pub execution_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub error_message: ::prost::alloc::string::String,
}
impl ::prost::Name for ExecutionFailed {
const NAME: &'static str = "ExecutionFailed";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutionFailed".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutionFailed".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerMessage {
#[prost(oneof = "server_message::ServerMessageKind", tags = "1, 2, 3")]
pub server_message_kind: ::core::option::Option<server_message::ServerMessageKind>,
}
pub mod server_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ServerMessageKind {
#[prost(message, tag = "1")]
Properties(super::ExecutorProperties),
#[prost(message, tag = "2")]
ExecutionReady(super::ExecutionReady),
#[prost(message, tag = "3")]
ExecutionCancelled(super::ExecutionCancelled),
}
}
impl ::prost::Name for ServerMessage {
const NAME: &'static str = "ServerMessage";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ServerMessage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ServerMessage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorProperties {
#[prost(string, tag = "1")]
pub executor_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub max_heartbeat_interval: ::core::option::Option<::prost_types::Duration>,
}
impl ::prost::Name for ExecutorProperties {
const NAME: &'static str = "ExecutorProperties";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorProperties".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorProperties".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionReady {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub execution_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub job_type_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub attempt_number: u64,
#[prost(string, tag = "5")]
pub input_payload_json: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub target_execution_time: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for ExecutionReady {
const NAME: &'static str = "ExecutionReady";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutionReady".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutionReady".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionCancelled {
#[prost(string, tag = "1")]
pub execution_id: ::prost::alloc::string::String,
}
impl ::prost::Name for ExecutionCancelled {
const NAME: &'static str = "ExecutionCancelled";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutionCancelled".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutionCancelled".into()
}
}
pub mod executor_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ExecutorServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ExecutorServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ExecutorServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ExecutorServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
ExecutorServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn executor_connection(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::ExecutorConnectionRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ExecutorConnectionResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ora.server.v1.ExecutorService/ExecutorConnection",
);
let mut req = request.into_streaming_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.ExecutorService",
"ExecutorConnection",
));
self.inner.streaming(req, path, codec).await
}
}
}
pub mod executor_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::*;
#[async_trait]
pub trait ExecutorService: std::marker::Send + std::marker::Sync + 'static {
async fn executor_connection(
&self,
request: tonic::Request<tonic::Streaming<super::ExecutorConnectionRequest>>,
) -> std::result::Result<
tonic::Response<BoxStream<super::ExecutorConnectionResponse>>,
tonic::Status,
> {
Err(tonic::Status::unimplemented("Not yet implemented"))
}
}
#[derive(Debug)]
pub struct ExecutorServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> ExecutorServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for ExecutorServiceServer<T>
where
T: ExecutorService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/ora.server.v1.ExecutorService/ExecutorConnection" => {
#[allow(non_camel_case_types)]
struct ExecutorConnectionSvc<T: ExecutorService>(pub Arc<T>);
impl<T: ExecutorService>
tonic::server::StreamingService<super::ExecutorConnectionRequest>
for ExecutorConnectionSvc<T>
{
type Response = super::ExecutorConnectionResponse;
type ResponseStream = BoxStream<super::ExecutorConnectionResponse>;
type Future =
BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<
tonic::Streaming<super::ExecutorConnectionRequest>,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ExecutorService>::executor_connection(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ExecutorConnectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
}),
}
}
}
impl<T> Clone for ExecutorServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "ora.server.v1.ExecutorService";
impl<T> tonic::server::NamedService for ExecutorServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddJobsRequest {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<super::super::common::v1::JobDefinition>,
}
impl ::prost::Name for AddJobsRequest {
const NAME: &'static str = "AddJobsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.AddJobsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.AddJobsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddJobsResponse {
#[prost(string, repeated, tag = "1")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for AddJobsResponse {
const NAME: &'static str = "AddJobsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.AddJobsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.AddJobsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsRequest {
#[prost(string, optional, tag = "1")]
pub cursor: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<JobQueryFilter>,
#[prost(enumeration = "JobQueryOrder", optional, tag = "3")]
pub order: ::core::option::Option<i32>,
#[prost(uint32, tag = "4")]
pub limit: u32,
}
impl ::prost::Name for ListJobsRequest {
const NAME: &'static str = "ListJobsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListJobsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListJobsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<Job>,
#[prost(string, optional, tag = "2")]
pub cursor: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "3")]
pub has_more: bool,
}
impl ::prost::Name for ListJobsResponse {
const NAME: &'static str = "ListJobsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListJobsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListJobsResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListJobTypesRequest {}
impl ::prost::Name for ListJobTypesRequest {
const NAME: &'static str = "ListJobTypesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListJobTypesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListJobTypesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobTypesResponse {
#[prost(message, repeated, tag = "1")]
pub job_types: ::prost::alloc::vec::Vec<super::super::common::v1::JobType>,
}
impl ::prost::Name for ListJobTypesResponse {
const NAME: &'static str = "ListJobTypesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListJobTypesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListJobTypesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountJobsRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<JobQueryFilter>,
}
impl ::prost::Name for CountJobsRequest {
const NAME: &'static str = "CountJobsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CountJobsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CountJobsRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CountJobsResponse {
#[prost(uint64, tag = "1")]
pub count: u64,
}
impl ::prost::Name for CountJobsResponse {
const NAME: &'static str = "CountJobsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CountJobsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CountJobsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelJobsRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<JobQueryFilter>,
}
impl ::prost::Name for CancelJobsRequest {
const NAME: &'static str = "CancelJobsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CancelJobsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CancelJobsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelJobsResponse {
#[prost(string, repeated, tag = "1")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for CancelJobsResponse {
const NAME: &'static str = "CancelJobsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CancelJobsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CancelJobsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteInactiveJobsRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<JobQueryFilter>,
}
impl ::prost::Name for DeleteInactiveJobsRequest {
const NAME: &'static str = "DeleteInactiveJobsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.DeleteInactiveJobsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.DeleteInactiveJobsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteInactiveJobsResponse {
#[prost(string, repeated, tag = "1")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for DeleteInactiveJobsResponse {
const NAME: &'static str = "DeleteInactiveJobsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.DeleteInactiveJobsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.DeleteInactiveJobsResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListExecutorsRequest {}
impl ::prost::Name for ListExecutorsRequest {
const NAME: &'static str = "ListExecutorsRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListExecutorsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListExecutorsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutorsResponse {
#[prost(message, repeated, tag = "1")]
pub executors: ::prost::alloc::vec::Vec<ExecutorInfo>,
}
impl ::prost::Name for ListExecutorsResponse {
const NAME: &'static str = "ListExecutorsResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListExecutorsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListExecutorsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSchedulesRequest {
#[prost(message, repeated, tag = "1")]
pub schedules: ::prost::alloc::vec::Vec<super::super::common::v1::ScheduleDefinition>,
}
impl ::prost::Name for CreateSchedulesRequest {
const NAME: &'static str = "CreateSchedulesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CreateSchedulesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CreateSchedulesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSchedulesResponse {
#[prost(string, repeated, tag = "1")]
pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for CreateSchedulesResponse {
const NAME: &'static str = "CreateSchedulesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CreateSchedulesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CreateSchedulesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesRequest {
#[prost(string, optional, tag = "1")]
pub cursor: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<ScheduleQueryFilter>,
#[prost(enumeration = "ScheduleQueryOrder", optional, tag = "3")]
pub order: ::core::option::Option<i32>,
#[prost(uint32, tag = "4")]
pub limit: u32,
}
impl ::prost::Name for ListSchedulesRequest {
const NAME: &'static str = "ListSchedulesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListSchedulesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListSchedulesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesResponse {
#[prost(message, repeated, tag = "1")]
pub schedules: ::prost::alloc::vec::Vec<Schedule>,
#[prost(string, optional, tag = "2")]
pub cursor: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "3")]
pub has_more: bool,
}
impl ::prost::Name for ListSchedulesResponse {
const NAME: &'static str = "ListSchedulesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ListSchedulesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ListSchedulesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountSchedulesRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<ScheduleQueryFilter>,
}
impl ::prost::Name for CountSchedulesRequest {
const NAME: &'static str = "CountSchedulesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CountSchedulesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CountSchedulesRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CountSchedulesResponse {
#[prost(uint64, tag = "1")]
pub count: u64,
}
impl ::prost::Name for CountSchedulesResponse {
const NAME: &'static str = "CountSchedulesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CountSchedulesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CountSchedulesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelSchedulesRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<ScheduleQueryFilter>,
#[prost(bool, tag = "2")]
pub cancel_jobs: bool,
}
impl ::prost::Name for CancelSchedulesRequest {
const NAME: &'static str = "CancelSchedulesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CancelSchedulesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CancelSchedulesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelSchedulesResponse {
#[prost(string, repeated, tag = "1")]
pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for CancelSchedulesResponse {
const NAME: &'static str = "CancelSchedulesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.CancelSchedulesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.CancelSchedulesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteInactiveSchedulesRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<ScheduleQueryFilter>,
}
impl ::prost::Name for DeleteInactiveSchedulesRequest {
const NAME: &'static str = "DeleteInactiveSchedulesRequest";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.DeleteInactiveSchedulesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.DeleteInactiveSchedulesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteInactiveSchedulesResponse {
#[prost(string, repeated, tag = "1")]
pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for DeleteInactiveSchedulesResponse {
const NAME: &'static str = "DeleteInactiveSchedulesResponse";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.DeleteInactiveSchedulesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.DeleteInactiveSchedulesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobQueryFilter {
#[prost(string, repeated, tag = "1")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub execution_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "JobExecutionStatus", repeated, tag = "5")]
pub status: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "6")]
pub labels: ::prost::alloc::vec::Vec<JobLabelFilter>,
#[prost(bool, optional, tag = "7")]
pub active: ::core::option::Option<bool>,
}
impl ::prost::Name for JobQueryFilter {
const NAME: &'static str = "JobQueryFilter";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.JobQueryFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.JobQueryFilter".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobLabelFilter {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(oneof = "job_label_filter::Value", tags = "2, 3")]
pub value: ::core::option::Option<job_label_filter::Value>,
}
pub mod job_label_filter {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(enumeration = "super::LabelFilterExistCondition", tag = "2")]
Exists(i32),
#[prost(string, tag = "3")]
Equals(::prost::alloc::string::String),
}
}
impl ::prost::Name for JobLabelFilter {
const NAME: &'static str = "JobLabelFilter";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.JobLabelFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.JobLabelFilter".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub schedule_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub definition: ::core::option::Option<super::super::common::v1::JobDefinition>,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "5")]
pub executions: ::prost::alloc::vec::Vec<JobExecution>,
#[prost(bool, tag = "6")]
pub active: bool,
#[prost(bool, tag = "7")]
pub cancelled: bool,
}
impl ::prost::Name for Job {
const NAME: &'static str = "Job";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.Job".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.Job".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobExecution {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub executor_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "JobExecutionStatus", tag = "4")]
pub status: i32,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub ready_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub assigned_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub succeeded_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "10")]
pub failed_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, optional, tag = "11")]
pub output_payload_json: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "12")]
pub failure_reason: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for JobExecution {
const NAME: &'static str = "JobExecution";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.JobExecution".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.JobExecution".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutorInfo {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub last_seen_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "4")]
pub alive: bool,
#[prost(string, repeated, tag = "5")]
pub supported_job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, tag = "6")]
pub max_concurrent_executions: u32,
#[prost(string, repeated, tag = "7")]
pub assigned_execution_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ExecutorInfo {
const NAME: &'static str = "ExecutorInfo";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ExecutorInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ExecutorInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub definition: ::core::option::Option<super::super::common::v1::ScheduleDefinition>,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "5")]
pub active: bool,
#[prost(bool, tag = "6")]
pub cancelled: bool,
}
impl ::prost::Name for Schedule {
const NAME: &'static str = "Schedule";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.Schedule".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.Schedule".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleQueryFilter {
#[prost(string, repeated, tag = "1")]
pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub labels: ::prost::alloc::vec::Vec<ScheduleLabelFilter>,
#[prost(bool, optional, tag = "5")]
pub active: ::core::option::Option<bool>,
}
impl ::prost::Name for ScheduleQueryFilter {
const NAME: &'static str = "ScheduleQueryFilter";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ScheduleQueryFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ScheduleQueryFilter".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleLabelFilter {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(oneof = "schedule_label_filter::Value", tags = "2, 3")]
pub value: ::core::option::Option<schedule_label_filter::Value>,
}
pub mod schedule_label_filter {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(enumeration = "super::LabelFilterExistCondition", tag = "2")]
Exists(i32),
#[prost(string, tag = "3")]
Equals(::prost::alloc::string::String),
}
}
impl ::prost::Name for ScheduleLabelFilter {
const NAME: &'static str = "ScheduleLabelFilter";
const PACKAGE: &'static str = "ora.server.v1";
fn full_name() -> ::prost::alloc::string::String {
"ora.server.v1.ScheduleLabelFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ora.server.v1.ScheduleLabelFilter".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobQueryOrder {
Unspecified = 0,
CreatedAtAsc = 1,
CreatedAtDesc = 2,
TargetExecutionTimeAsc = 3,
TargetExecutionTimeDesc = 4,
}
impl JobQueryOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "JOB_QUERY_ORDER_UNSPECIFIED",
Self::CreatedAtAsc => "JOB_QUERY_ORDER_CREATED_AT_ASC",
Self::CreatedAtDesc => "JOB_QUERY_ORDER_CREATED_AT_DESC",
Self::TargetExecutionTimeAsc => "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_ASC",
Self::TargetExecutionTimeDesc => "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_QUERY_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"JOB_QUERY_ORDER_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
"JOB_QUERY_ORDER_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
"JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_ASC" => Some(Self::TargetExecutionTimeAsc),
"JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_DESC" => Some(Self::TargetExecutionTimeDesc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobExecutionStatus {
Unspecified = 0,
Pending = 1,
Ready = 2,
Assigned = 3,
Running = 4,
Succeeded = 5,
Failed = 6,
}
impl JobExecutionStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "JOB_EXECUTION_STATUS_UNSPECIFIED",
Self::Pending => "JOB_EXECUTION_STATUS_PENDING",
Self::Ready => "JOB_EXECUTION_STATUS_READY",
Self::Assigned => "JOB_EXECUTION_STATUS_ASSIGNED",
Self::Running => "JOB_EXECUTION_STATUS_RUNNING",
Self::Succeeded => "JOB_EXECUTION_STATUS_SUCCEEDED",
Self::Failed => "JOB_EXECUTION_STATUS_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"JOB_EXECUTION_STATUS_PENDING" => Some(Self::Pending),
"JOB_EXECUTION_STATUS_READY" => Some(Self::Ready),
"JOB_EXECUTION_STATUS_ASSIGNED" => Some(Self::Assigned),
"JOB_EXECUTION_STATUS_RUNNING" => Some(Self::Running),
"JOB_EXECUTION_STATUS_SUCCEEDED" => Some(Self::Succeeded),
"JOB_EXECUTION_STATUS_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ScheduleQueryOrder {
Unspecified = 0,
CreatedAtAsc = 1,
CreatedAtDesc = 2,
}
impl ScheduleQueryOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SCHEDULE_QUERY_ORDER_UNSPECIFIED",
Self::CreatedAtAsc => "SCHEDULE_QUERY_ORDER_CREATED_AT_ASC",
Self::CreatedAtDesc => "SCHEDULE_QUERY_ORDER_CREATED_AT_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEDULE_QUERY_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"SCHEDULE_QUERY_ORDER_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
"SCHEDULE_QUERY_ORDER_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LabelFilterExistCondition {
Unspecified = 0,
Exists = 1,
}
impl LabelFilterExistCondition {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "LABEL_FILTER_EXIST_CONDITION_UNSPECIFIED",
Self::Exists => "LABEL_FILTER_EXIST_CONDITION_EXISTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LABEL_FILTER_EXIST_CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
"LABEL_FILTER_EXIST_CONDITION_EXISTS" => Some(Self::Exists),
_ => None,
}
}
}
pub mod admin_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct AdminServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AdminServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> AdminServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdminServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
AdminServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn add_jobs(
&mut self,
request: impl tonic::IntoRequest<super::AddJobsRequest>,
) -> std::result::Result<tonic::Response<super::AddJobsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/AddJobs");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ora.server.v1.AdminService", "AddJobs"));
self.inner.unary(req, path, codec).await
}
pub async fn list_jobs(
&mut self,
request: impl tonic::IntoRequest<super::ListJobsRequest>,
) -> std::result::Result<tonic::Response<super::ListJobsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListJobs");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ora.server.v1.AdminService", "ListJobs"));
self.inner.unary(req, path, codec).await
}
pub async fn count_jobs(
&mut self,
request: impl tonic::IntoRequest<super::CountJobsRequest>,
) -> std::result::Result<tonic::Response<super::CountJobsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CountJobs");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ora.server.v1.AdminService", "CountJobs"));
self.inner.unary(req, path, codec).await
}
pub async fn list_job_types(
&mut self,
request: impl tonic::IntoRequest<super::ListJobTypesRequest>,
) -> std::result::Result<tonic::Response<super::ListJobTypesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListJobTypes");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"ListJobTypes",
));
self.inner.unary(req, path, codec).await
}
pub async fn cancel_jobs(
&mut self,
request: impl tonic::IntoRequest<super::CancelJobsRequest>,
) -> std::result::Result<tonic::Response<super::CancelJobsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CancelJobs");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ora.server.v1.AdminService", "CancelJobs"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_inactive_jobs(
&mut self,
request: impl tonic::IntoRequest<super::DeleteInactiveJobsRequest>,
) -> std::result::Result<tonic::Response<super::DeleteInactiveJobsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ora.server.v1.AdminService/DeleteInactiveJobs",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"DeleteInactiveJobs",
));
self.inner.unary(req, path, codec).await
}
pub async fn list_executors(
&mut self,
request: impl tonic::IntoRequest<super::ListExecutorsRequest>,
) -> std::result::Result<tonic::Response<super::ListExecutorsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListExecutors");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"ListExecutors",
));
self.inner.unary(req, path, codec).await
}
pub async fn create_schedules(
&mut self,
request: impl tonic::IntoRequest<super::CreateSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CreateSchedulesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CreateSchedules");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"CreateSchedules",
));
self.inner.unary(req, path, codec).await
}
pub async fn list_schedules(
&mut self,
request: impl tonic::IntoRequest<super::ListSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::ListSchedulesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListSchedules");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"ListSchedules",
));
self.inner.unary(req, path, codec).await
}
pub async fn count_schedules(
&mut self,
request: impl tonic::IntoRequest<super::CountSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CountSchedulesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CountSchedules");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"CountSchedules",
));
self.inner.unary(req, path, codec).await
}
pub async fn cancel_schedules(
&mut self,
request: impl tonic::IntoRequest<super::CancelSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CancelSchedulesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CancelSchedules");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"CancelSchedules",
));
self.inner.unary(req, path, codec).await
}
pub async fn delete_inactive_schedules(
&mut self,
request: impl tonic::IntoRequest<super::DeleteInactiveSchedulesRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteInactiveSchedulesResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ora.server.v1.AdminService/DeleteInactiveSchedules",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"ora.server.v1.AdminService",
"DeleteInactiveSchedules",
));
self.inner.unary(req, path, codec).await
}
}
}
pub mod admin_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::*;
#[async_trait]
pub trait AdminService: std::marker::Send + std::marker::Sync + 'static {
async fn add_jobs(
&self,
request: tonic::Request<super::AddJobsRequest>,
) -> std::result::Result<tonic::Response<super::AddJobsResponse>, tonic::Status> {
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn list_jobs(
&self,
request: tonic::Request<super::ListJobsRequest>,
) -> std::result::Result<tonic::Response<super::ListJobsResponse>, tonic::Status> {
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn count_jobs(
&self,
request: tonic::Request<super::CountJobsRequest>,
) -> std::result::Result<tonic::Response<super::CountJobsResponse>, tonic::Status> {
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn list_job_types(
&self,
request: tonic::Request<super::ListJobTypesRequest>,
) -> std::result::Result<tonic::Response<super::ListJobTypesResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn cancel_jobs(
&self,
request: tonic::Request<super::CancelJobsRequest>,
) -> std::result::Result<tonic::Response<super::CancelJobsResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn delete_inactive_jobs(
&self,
request: tonic::Request<super::DeleteInactiveJobsRequest>,
) -> std::result::Result<tonic::Response<super::DeleteInactiveJobsResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn list_executors(
&self,
request: tonic::Request<super::ListExecutorsRequest>,
) -> std::result::Result<tonic::Response<super::ListExecutorsResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn create_schedules(
&self,
request: tonic::Request<super::CreateSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CreateSchedulesResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn list_schedules(
&self,
request: tonic::Request<super::ListSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::ListSchedulesResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn count_schedules(
&self,
request: tonic::Request<super::CountSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CountSchedulesResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn cancel_schedules(
&self,
request: tonic::Request<super::CancelSchedulesRequest>,
) -> std::result::Result<tonic::Response<super::CancelSchedulesResponse>, tonic::Status>
{
Err(tonic::Status::unimplemented("Not yet implemented"))
}
async fn delete_inactive_schedules(
&self,
request: tonic::Request<super::DeleteInactiveSchedulesRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteInactiveSchedulesResponse>,
tonic::Status,
> {
Err(tonic::Status::unimplemented("Not yet implemented"))
}
}
#[derive(Debug)]
pub struct AdminServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> AdminServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for AdminServiceServer<T>
where
T: AdminService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/ora.server.v1.AdminService/AddJobs" => {
#[allow(non_camel_case_types)]
struct AddJobsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::AddJobsRequest> for AddJobsSvc<T> {
type Response = super::AddJobsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::AddJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut =
async move { <T as AdminService>::add_jobs(&inner, request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AddJobsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/ListJobs" => {
#[allow(non_camel_case_types)]
struct ListJobsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::ListJobsRequest> for ListJobsSvc<T> {
type Response = super::ListJobsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ListJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::list_jobs(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListJobsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/CountJobs" => {
#[allow(non_camel_case_types)]
struct CountJobsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::CountJobsRequest> for CountJobsSvc<T> {
type Response = super::CountJobsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CountJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::count_jobs(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CountJobsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/ListJobTypes" => {
#[allow(non_camel_case_types)]
struct ListJobTypesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::ListJobTypesRequest>
for ListJobTypesSvc<T>
{
type Response = super::ListJobTypesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ListJobTypesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::list_job_types(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListJobTypesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/CancelJobs" => {
#[allow(non_camel_case_types)]
struct CancelJobsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::CancelJobsRequest> for CancelJobsSvc<T> {
type Response = super::CancelJobsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CancelJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::cancel_jobs(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CancelJobsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/DeleteInactiveJobs" => {
#[allow(non_camel_case_types)]
struct DeleteInactiveJobsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService>
tonic::server::UnaryService<super::DeleteInactiveJobsRequest>
for DeleteInactiveJobsSvc<T>
{
type Response = super::DeleteInactiveJobsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::DeleteInactiveJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::delete_inactive_jobs(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DeleteInactiveJobsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/ListExecutors" => {
#[allow(non_camel_case_types)]
struct ListExecutorsSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::ListExecutorsRequest>
for ListExecutorsSvc<T>
{
type Response = super::ListExecutorsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ListExecutorsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::list_executors(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListExecutorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/CreateSchedules" => {
#[allow(non_camel_case_types)]
struct CreateSchedulesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::CreateSchedulesRequest>
for CreateSchedulesSvc<T>
{
type Response = super::CreateSchedulesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CreateSchedulesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::create_schedules(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSchedulesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/ListSchedules" => {
#[allow(non_camel_case_types)]
struct ListSchedulesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::ListSchedulesRequest>
for ListSchedulesSvc<T>
{
type Response = super::ListSchedulesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ListSchedulesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::list_schedules(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListSchedulesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/CountSchedules" => {
#[allow(non_camel_case_types)]
struct CountSchedulesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::CountSchedulesRequest>
for CountSchedulesSvc<T>
{
type Response = super::CountSchedulesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CountSchedulesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::count_schedules(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CountSchedulesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/CancelSchedules" => {
#[allow(non_camel_case_types)]
struct CancelSchedulesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService> tonic::server::UnaryService<super::CancelSchedulesRequest>
for CancelSchedulesSvc<T>
{
type Response = super::CancelSchedulesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CancelSchedulesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::cancel_schedules(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CancelSchedulesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ora.server.v1.AdminService/DeleteInactiveSchedules" => {
#[allow(non_camel_case_types)]
struct DeleteInactiveSchedulesSvc<T: AdminService>(pub Arc<T>);
impl<T: AdminService>
tonic::server::UnaryService<super::DeleteInactiveSchedulesRequest>
for DeleteInactiveSchedulesSvc<T>
{
type Response = super::DeleteInactiveSchedulesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::DeleteInactiveSchedulesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as AdminService>::delete_inactive_schedules(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DeleteInactiveSchedulesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
}),
}
}
}
impl<T> Clone for AdminServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "ora.server.v1.AdminService";
impl<T> tonic::server::NamedService for AdminServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}