#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentInstance {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub agent_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterResponse {
#[prost(string, tag = "1")]
pub agent_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalAgentRegisterRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub agent_version: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalAgentRegisterMetadata {
#[prost(string, tag = "1")]
pub agent_instance_id: ::prost::alloc::string::String,
}
pub mod agent_registration_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AgentRegistrationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AgentRegistrationServiceClient<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> AgentRegistrationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> AgentRegistrationServiceClient<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> + Send + Sync,
{
AgentRegistrationServiceClient::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 register(
&mut self,
request: impl tonic::IntoRequest<super::RegisterRequest>,
) -> std::result::Result<
tonic::Response<super::RegisterResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.AgentRegistrationService/Register",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.AgentRegistrationService",
"Register",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn external_agent_register(
&mut self,
request: impl tonic::IntoRequest<super::ExternalAgentRegisterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.AgentRegistrationService/ExternalAgentRegister",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.AgentRegistrationService",
"ExternalAgentRegister",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClaimAgentStatusRequest {
#[prost(string, tag = "1")]
pub agent_instance_id: ::prost::alloc::string::String,
#[prost(enumeration = "claim_agent_status_request::Status", tag = "2")]
pub status: i32,
#[prost(string, tag = "3")]
pub status_message: ::prost::alloc::string::String,
}
pub mod claim_agent_status_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
ReadyForTest = 1,
PreparingTest = 2,
Testing = 3,
TankFailed = 4,
Stopped = 5,
UploadingArtifacts = 6,
Error = 7,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::ReadyForTest => "READY_FOR_TEST",
Status::PreparingTest => "PREPARING_TEST",
Status::Testing => "TESTING",
Status::TankFailed => "TANK_FAILED",
Status::Stopped => "STOPPED",
Status::UploadingArtifacts => "UPLOADING_ARTIFACTS",
Status::Error => "ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"READY_FOR_TEST" => Some(Self::ReadyForTest),
"PREPARING_TEST" => Some(Self::PreparingTest),
"TESTING" => Some(Self::Testing),
"TANK_FAILED" => Some(Self::TankFailed),
"STOPPED" => Some(Self::Stopped),
"UPLOADING_ARTIFACTS" => Some(Self::UploadingArtifacts),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClaimAgentStatusResponse {
#[prost(int64, tag = "1")]
pub code: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportEventLogsRequest {
#[prost(string, tag = "1")]
pub agent_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub events: ::prost::alloc::vec::Vec<EventLog>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportEventLogsResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventLog {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
#[prost(enumeration = "event_log::Severity", tag = "2")]
pub severity: i32,
#[prost(message, optional, tag = "3")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "4")]
pub metadata: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
pub mod event_log {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Severity {
Unspecified = 0,
Debug = 1,
Info = 2,
Warning = 3,
Error = 4,
Fatal = 5,
}
impl Severity {
pub fn as_str_name(&self) -> &'static str {
match self {
Severity::Unspecified => "SEVERITY_UNSPECIFIED",
Severity::Debug => "DEBUG",
Severity::Info => "INFO",
Severity::Warning => "WARNING",
Severity::Error => "ERROR",
Severity::Fatal => "FATAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"DEBUG" => Some(Self::Debug),
"INFO" => Some(Self::Info),
"WARNING" => Some(Self::Warning),
"ERROR" => Some(Self::Error),
"FATAL" => Some(Self::Fatal),
_ => None,
}
}
}
}
pub mod agent_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AgentServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AgentServiceClient<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> AgentServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> AgentServiceClient<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> + Send + Sync,
{
AgentServiceClient::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 claim_status(
&mut self,
request: impl tonic::IntoRequest<super::ClaimAgentStatusRequest>,
) -> std::result::Result<
tonic::Response<super::ClaimAgentStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.AgentService/ClaimStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.AgentService",
"ClaimStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn report_event_logs(
&mut self,
request: impl tonic::IntoRequest<super::ReportEventLogsRequest>,
) -> std::result::Result<
tonic::Response<super::ReportEventLogsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.AgentService/ReportEventLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.AgentService",
"ReportEventLogs",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub config: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub ammo: ::core::option::Option<File>,
#[prost(string, tag = "4")]
pub logging_log_group_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub test_data: ::core::option::Option<StorageObject>,
#[prost(message, repeated, tag = "6")]
pub data_payload: ::prost::alloc::vec::Vec<TestDataEntry>,
#[prost(message, optional, tag = "7")]
pub artifact_upload_settings: ::core::option::Option<TestArtifactUploadSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct File {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub content: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageObject {
#[prost(string, tag = "1")]
pub object_storage_bucket: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub object_storage_filename: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestDataEntry {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub is_transient: bool,
#[prost(message, optional, tag = "3")]
pub storage_object: ::core::option::Option<StorageObject>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestArtifactUploadSettings {
#[prost(string, tag = "1")]
pub output_bucket: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub output_name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub is_archive: bool,
#[prost(string, repeated, tag = "4")]
pub filter_include: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub filter_exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetJobTransientFile {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetJobRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub agent_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClaimJobStatusRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(enumeration = "claim_job_status_request::JobStatus", tag = "2")]
pub status: i32,
#[prost(string, tag = "3")]
pub error: ::prost::alloc::string::String,
}
pub mod claim_job_status_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JobStatus {
Unspecified = 0,
PostProcess = 1,
Initiated = 2,
Preparing = 3,
NotFound = 4,
Running = 5,
Finishing = 6,
Finished = 7,
Stopped = 8,
Failed = 9,
Autostopped = 10,
WaitingForACommandToRun = 11,
}
impl JobStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
JobStatus::Unspecified => "JOB_STATUS_UNSPECIFIED",
JobStatus::PostProcess => "POST_PROCESS",
JobStatus::Initiated => "INITIATED",
JobStatus::Preparing => "PREPARING",
JobStatus::NotFound => "NOT_FOUND",
JobStatus::Running => "RUNNING",
JobStatus::Finishing => "FINISHING",
JobStatus::Finished => "FINISHED",
JobStatus::Stopped => "STOPPED",
JobStatus::Failed => "FAILED",
JobStatus::Autostopped => "AUTOSTOPPED",
JobStatus::WaitingForACommandToRun => "WAITING_FOR_A_COMMAND_TO_RUN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"POST_PROCESS" => Some(Self::PostProcess),
"INITIATED" => Some(Self::Initiated),
"PREPARING" => Some(Self::Preparing),
"NOT_FOUND" => Some(Self::NotFound),
"RUNNING" => Some(Self::Running),
"FINISHING" => Some(Self::Finishing),
"FINISHED" => Some(Self::Finished),
"STOPPED" => Some(Self::Stopped),
"FAILED" => Some(Self::Failed),
"AUTOSTOPPED" => Some(Self::Autostopped),
"WAITING_FOR_A_COMMAND_TO_RUN" => Some(Self::WaitingForACommandToRun),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClaimJobStatusResponse {
#[prost(int64, tag = "1")]
pub code: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobSignalRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobSignalResponse {
#[prost(enumeration = "job_signal_response::Signal", tag = "1")]
pub signal: i32,
#[prost(double, tag = "2")]
pub wait_duration: f64,
#[prost(double, tag = "3")]
pub run_in: f64,
}
pub mod job_signal_response {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Signal {
Unspecified = 0,
Stop = 1,
Wait = 2,
RunIn = 3,
}
impl Signal {
pub fn as_str_name(&self) -> &'static str {
match self {
Signal::Unspecified => "SIGNAL_UNSPECIFIED",
Signal::Stop => "STOP",
Signal::Wait => "WAIT",
Signal::RunIn => "RUN_IN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNAL_UNSPECIFIED" => Some(Self::Unspecified),
"STOP" => Some(Self::Stop),
"WAIT" => Some(Self::Wait),
"RUN_IN" => Some(Self::RunIn),
_ => None,
}
}
}
}
pub mod job_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct JobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl JobServiceClient<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> JobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> JobServiceClient<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> + Send + Sync,
{
JobServiceClient::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 claim_status(
&mut self,
request: impl tonic::IntoRequest<super::ClaimJobStatusRequest>,
) -> std::result::Result<
tonic::Response<super::ClaimJobStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.JobService/ClaimStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.JobService",
"ClaimStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetJobRequest>,
) -> std::result::Result<tonic::Response<super::Job>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.JobService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.JobService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_signal(
&mut self,
request: impl tonic::IntoRequest<super::JobSignalRequest>,
) -> std::result::Result<
tonic::Response<super::JobSignalResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.JobService/GetSignal",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.JobService",
"GetSignal",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_transient_file(
&mut self,
request: impl tonic::IntoRequest<super::GetJobTransientFile>,
) -> std::result::Result<tonic::Response<super::File>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.JobService/GetTransientFile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.JobService",
"GetTransientFile",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddMetricRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub job_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub chunks: ::prost::alloc::vec::Vec<MetricChunk>,
#[prost(string, tag = "5")]
pub agent_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricChunk {
#[prost(message, repeated, tag = "1")]
pub data: ::prost::alloc::vec::Vec<Metric>,
#[prost(int64, tag = "2")]
pub timestamp: i64,
#[prost(string, tag = "3")]
pub comment: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub instance_host: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metric {
#[prost(string, tag = "1")]
pub metric_type: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub metric_name: ::prost::alloc::string::String,
#[prost(double, tag = "3")]
pub metric_value: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddMetricResponse {
#[prost(string, tag = "1")]
pub metric_trail_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub code: i64,
}
pub mod monitoring_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MonitoringServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MonitoringServiceClient<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> MonitoringServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> MonitoringServiceClient<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> + Send + Sync,
{
MonitoringServiceClient::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_metric(
&mut self,
request: impl tonic::IntoRequest<super::AddMetricRequest>,
) -> std::result::Result<
tonic::Response<super::AddMetricResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.MonitoringService/AddMetric",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.MonitoringService",
"AddMetric",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Test {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "test::Generator", tag = "10")]
pub generator: i32,
#[prost(string, tag = "11")]
pub agent_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub target_address: ::prost::alloc::string::String,
#[prost(int64, tag = "13")]
pub target_port: i64,
#[prost(string, tag = "14")]
pub target_version: ::prost::alloc::string::String,
#[prost(string, tag = "15")]
pub config: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "18")]
pub cases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "test::Status", tag = "19")]
pub status: i32,
#[prost(string, repeated, tag = "20")]
pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "21")]
pub favorite: bool,
#[prost(oneof = "test::Ammo", tags = "16, 17")]
pub ammo: ::core::option::Option<test::Ammo>,
}
pub mod test {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Created = 1,
Initiated = 2,
Preparing = 3,
Running = 4,
Finishing = 5,
Done = 6,
PostProcessing = 7,
Failed = 8,
Stopping = 9,
Stopped = 10,
Autostopped = 11,
Waiting = 12,
Deleting = 13,
Lost = 14,
Cancelled = 15,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Created => "CREATED",
Status::Initiated => "INITIATED",
Status::Preparing => "PREPARING",
Status::Running => "RUNNING",
Status::Finishing => "FINISHING",
Status::Done => "DONE",
Status::PostProcessing => "POST_PROCESSING",
Status::Failed => "FAILED",
Status::Stopping => "STOPPING",
Status::Stopped => "STOPPED",
Status::Autostopped => "AUTOSTOPPED",
Status::Waiting => "WAITING",
Status::Deleting => "DELETING",
Status::Lost => "LOST",
Status::Cancelled => "CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"CREATED" => Some(Self::Created),
"INITIATED" => Some(Self::Initiated),
"PREPARING" => Some(Self::Preparing),
"RUNNING" => Some(Self::Running),
"FINISHING" => Some(Self::Finishing),
"DONE" => Some(Self::Done),
"POST_PROCESSING" => Some(Self::PostProcessing),
"FAILED" => Some(Self::Failed),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"AUTOSTOPPED" => Some(Self::Autostopped),
"WAITING" => Some(Self::Waiting),
"DELETING" => Some(Self::Deleting),
"LOST" => Some(Self::Lost),
"CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Generator {
Unspecified = 0,
Pandora = 1,
Phantom = 2,
Jmeter = 3,
}
impl Generator {
pub fn as_str_name(&self) -> &'static str {
match self {
Generator::Unspecified => "GENERATOR_UNSPECIFIED",
Generator::Pandora => "PANDORA",
Generator::Phantom => "PHANTOM",
Generator::Jmeter => "JMETER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GENERATOR_UNSPECIFIED" => Some(Self::Unspecified),
"PANDORA" => Some(Self::Pandora),
"PHANTOM" => Some(Self::Phantom),
"JMETER" => Some(Self::Jmeter),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Ammo {
#[prost(string, tag = "16")]
AmmoUrls(::prost::alloc::string::String),
#[prost(string, tag = "17")]
AmmoId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTestRequest {
#[prost(string, tag = "1")]
pub test_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTestRequest {
#[prost(string, tag = "1")]
pub test_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[deprecated]
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[deprecated]
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[deprecated]
#[prost(bool, tag = "6")]
pub favorite: bool,
#[deprecated]
#[prost(string, tag = "7")]
pub target_version: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub imbalance_point: i64,
#[prost(int64, tag = "9")]
pub imbalance_ts: i64,
#[prost(string, tag = "10")]
pub imbalance_comment: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTestMetadata {
#[prost(string, tag = "1")]
pub test_id: ::prost::alloc::string::String,
}
pub mod test_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct TestServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TestServiceClient<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> TestServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> TestServiceClient<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> + Send + Sync,
{
TestServiceClient::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 get(
&mut self,
request: impl tonic::IntoRequest<super::GetTestRequest>,
) -> std::result::Result<tonic::Response<super::Test>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.TestService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.TestService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateTestRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.TestService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.TestService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTrailRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub data: ::prost::alloc::vec::Vec<Trail>,
#[prost(string, tag = "3")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub agent_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trail {
#[prost(int64, tag = "1")]
pub overall: i64,
#[prost(string, tag = "2")]
pub case_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub time: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub reqps: i64,
#[prost(int64, tag = "5")]
pub resps: i64,
#[prost(double, tag = "6")]
pub expect: f64,
#[prost(int64, tag = "7")]
pub input: i64,
#[prost(int64, tag = "8")]
pub output: i64,
#[prost(double, tag = "9")]
pub connect_time: f64,
#[prost(double, tag = "10")]
pub send_time: f64,
#[prost(double, tag = "11")]
pub latency: f64,
#[prost(double, tag = "12")]
pub receive_time: f64,
#[prost(int64, tag = "13")]
pub threads: i64,
#[prost(double, tag = "14")]
pub q50: f64,
#[prost(double, tag = "15")]
pub q75: f64,
#[prost(double, tag = "16")]
pub q80: f64,
#[prost(double, tag = "17")]
pub q85: f64,
#[prost(double, tag = "18")]
pub q90: f64,
#[prost(double, tag = "19")]
pub q95: f64,
#[prost(double, tag = "20")]
pub q98: f64,
#[prost(double, tag = "21")]
pub q99: f64,
#[prost(double, tag = "22")]
pub q100: f64,
#[prost(message, repeated, tag = "23")]
pub http_codes: ::prost::alloc::vec::Vec<trail::Codes>,
#[prost(message, repeated, tag = "24")]
pub net_codes: ::prost::alloc::vec::Vec<trail::Codes>,
#[prost(message, repeated, tag = "25")]
pub time_intervals: ::prost::alloc::vec::Vec<trail::Intervals>,
}
pub mod trail {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Codes {
#[prost(int64, tag = "1")]
pub code: i64,
#[prost(int64, tag = "2")]
pub count: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Intervals {
#[prost(double, tag = "1")]
pub to: f64,
#[prost(int64, tag = "2")]
pub count: i64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTrailResponse {
#[prost(string, tag = "1")]
pub trail_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub code: i64,
}
pub mod trail_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct TrailServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TrailServiceClient<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> TrailServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
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,
) -> TrailServiceClient<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> + Send + Sync,
{
TrailServiceClient::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 create(
&mut self,
request: impl tonic::IntoRequest<super::CreateTrailRequest>,
) -> std::result::Result<
tonic::Response<super::CreateTrailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.loadtesting.agent.v1.TrailService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.loadtesting.agent.v1.TrailService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
}
}