talos_rust_client/generated/
inspect.rs1#[derive(serde::Serialize, serde::Deserialize)]
4#[serde(rename_all = "camelCase")]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct ControllerRuntimeDependency {
7 #[prost(message, optional, tag = "1")]
8 pub metadata: ::core::option::Option<super::common::Metadata>,
9 #[prost(message, repeated, tag = "2")]
10 pub edges: ::prost::alloc::vec::Vec<ControllerDependencyEdge>,
11}
12#[derive(serde::Serialize, serde::Deserialize)]
13#[serde(rename_all = "camelCase")]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct ControllerRuntimeDependenciesResponse {
16 #[prost(message, repeated, tag = "1")]
17 pub messages: ::prost::alloc::vec::Vec<ControllerRuntimeDependency>,
18}
19#[derive(serde::Serialize, serde::Deserialize)]
20#[serde(rename_all = "camelCase")]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct ControllerDependencyEdge {
23 #[prost(string, tag = "1")]
24 pub controller_name: ::prost::alloc::string::String,
25 #[prost(enumeration = "DependencyEdgeType", tag = "2")]
26 pub edge_type: i32,
27 #[prost(string, tag = "3")]
28 pub resource_namespace: ::prost::alloc::string::String,
29 #[prost(string, tag = "4")]
30 pub resource_type: ::prost::alloc::string::String,
31 #[prost(string, tag = "5")]
32 pub resource_id: ::prost::alloc::string::String,
33}
34#[derive(serde::Serialize, serde::Deserialize)]
35#[serde(rename_all = "camelCase")]
36#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
37#[repr(i32)]
38pub enum DependencyEdgeType {
39 OutputExclusive = 0,
40 OutputShared = 3,
41 InputStrong = 1,
42 InputWeak = 2,
43 InputDestroyReady = 4,
44}
45impl DependencyEdgeType {
46 pub fn as_str_name(&self) -> &'static str {
51 match self {
52 Self::OutputExclusive => "OUTPUT_EXCLUSIVE",
53 Self::OutputShared => "OUTPUT_SHARED",
54 Self::InputStrong => "INPUT_STRONG",
55 Self::InputWeak => "INPUT_WEAK",
56 Self::InputDestroyReady => "INPUT_DESTROY_READY",
57 }
58 }
59 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
61 match value {
62 "OUTPUT_EXCLUSIVE" => Some(Self::OutputExclusive),
63 "OUTPUT_SHARED" => Some(Self::OutputShared),
64 "INPUT_STRONG" => Some(Self::InputStrong),
65 "INPUT_WEAK" => Some(Self::InputWeak),
66 "INPUT_DESTROY_READY" => Some(Self::InputDestroyReady),
67 _ => None,
68 }
69 }
70}
71pub mod inspect_service_client {
73 #![allow(
74 unused_variables,
75 dead_code,
76 missing_docs,
77 clippy::wildcard_imports,
78 clippy::let_unit_value,
79 )]
80 use tonic::codegen::*;
81 use tonic::codegen::http::Uri;
82 #[derive(Debug, Clone)]
86 pub struct InspectServiceClient<T> {
87 inner: tonic::client::Grpc<T>,
88 }
89 impl InspectServiceClient<tonic::transport::Channel> {
90 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
92 where
93 D: TryInto<tonic::transport::Endpoint>,
94 D::Error: Into<StdError>,
95 {
96 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
97 Ok(Self::new(conn))
98 }
99 }
100 impl<T> InspectServiceClient<T>
101 where
102 T: tonic::client::GrpcService<tonic::body::BoxBody>,
103 T::Error: Into<StdError>,
104 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
105 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
106 {
107 pub fn new(inner: T) -> Self {
108 let inner = tonic::client::Grpc::new(inner);
109 Self { inner }
110 }
111 pub fn with_origin(inner: T, origin: Uri) -> Self {
112 let inner = tonic::client::Grpc::with_origin(inner, origin);
113 Self { inner }
114 }
115 pub fn with_interceptor<F>(
116 inner: T,
117 interceptor: F,
118 ) -> InspectServiceClient<InterceptedService<T, F>>
119 where
120 F: tonic::service::Interceptor,
121 T::ResponseBody: Default,
122 T: tonic::codegen::Service<
123 http::Request<tonic::body::BoxBody>,
124 Response = http::Response<
125 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
126 >,
127 >,
128 <T as tonic::codegen::Service<
129 http::Request<tonic::body::BoxBody>,
130 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
131 {
132 InspectServiceClient::new(InterceptedService::new(inner, interceptor))
133 }
134 #[must_use]
139 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
140 self.inner = self.inner.send_compressed(encoding);
141 self
142 }
143 #[must_use]
145 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
146 self.inner = self.inner.accept_compressed(encoding);
147 self
148 }
149 #[must_use]
153 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
154 self.inner = self.inner.max_decoding_message_size(limit);
155 self
156 }
157 #[must_use]
161 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
162 self.inner = self.inner.max_encoding_message_size(limit);
163 self
164 }
165 pub async fn controller_runtime_dependencies(
166 &mut self,
167 request: impl tonic::IntoRequest<super::super::google::protobuf::Empty>,
168 ) -> std::result::Result<
169 tonic::Response<super::ControllerRuntimeDependenciesResponse>,
170 tonic::Status,
171 > {
172 self.inner
173 .ready()
174 .await
175 .map_err(|e| {
176 tonic::Status::unknown(
177 format!("Service was not ready: {}", e.into()),
178 )
179 })?;
180 let codec = tonic::codec::ProstCodec::default();
181 let path = http::uri::PathAndQuery::from_static(
182 "/inspect.InspectService/ControllerRuntimeDependencies",
183 );
184 let mut req = request.into_request();
185 req.extensions_mut()
186 .insert(
187 GrpcMethod::new(
188 "inspect.InspectService",
189 "ControllerRuntimeDependencies",
190 ),
191 );
192 self.inner.unary(req, path, codec).await
193 }
194 }
195}