1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Status {
5 #[prost(enumeration = "status::Code", tag = "1")]
6 pub code: i32,
7 #[prost(string, tag = "2")]
8 pub message: ::prost::alloc::string::String,
9}
10pub mod status {
12 #[derive(prost_helpers::AnyPB)]
13 #[derive(
14 Clone,
15 Copy,
16 Debug,
17 PartialEq,
18 Eq,
19 Hash,
20 PartialOrd,
21 Ord,
22 ::prost::Enumeration
23 )]
24 #[repr(i32)]
25 pub enum Code {
26 Unspecified = 0,
27 Ok = 1,
28 UnknownWorker = 2,
29 }
30 impl Code {
31 pub fn as_str_name(&self) -> &'static str {
36 match self {
37 Self::Unspecified => "UNSPECIFIED",
38 Self::Ok => "OK",
39 Self::UnknownWorker => "UNKNOWN_WORKER",
40 }
41 }
42 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
44 match value {
45 "UNSPECIFIED" => Some(Self::Unspecified),
46 "OK" => Some(Self::Ok),
47 "UNKNOWN_WORKER" => Some(Self::UnknownWorker),
48 _ => None,
49 }
50 }
51 }
52}
53#[derive(prost_helpers::AnyPB)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct HostAddress {
56 #[prost(string, tag = "1")]
57 pub host: ::prost::alloc::string::String,
58 #[prost(int32, tag = "2")]
59 pub port: i32,
60}
61#[derive(prost_helpers::AnyPB)]
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct ActorInfo {
65 #[prost(uint32, tag = "1")]
66 pub actor_id: u32,
67 #[prost(message, optional, tag = "2")]
68 pub host: ::core::option::Option<HostAddress>,
69}
70#[derive(prost_helpers::AnyPB)]
72#[derive(Clone, Copy, PartialEq, ::prost::Message)]
73pub struct ActorLocation {
74 #[prost(uint32, tag = "2")]
75 pub worker_node_id: u32,
76}
77#[derive(prost_helpers::AnyPB)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct WorkerNode {
80 #[prost(uint32, tag = "1")]
81 pub id: u32,
82 #[prost(enumeration = "WorkerType", tag = "2")]
83 pub r#type: i32,
84 #[prost(message, optional, tag = "3")]
85 pub host: ::core::option::Option<HostAddress>,
86 #[prost(enumeration = "worker_node::State", tag = "4")]
87 pub state: i32,
88 #[prost(message, optional, tag = "6")]
89 pub property: ::core::option::Option<worker_node::Property>,
90 #[prost(uint32, optional, tag = "7")]
92 pub transactional_id: ::core::option::Option<u32>,
93 #[prost(message, optional, tag = "8")]
97 pub resource: ::core::option::Option<worker_node::Resource>,
98 #[prost(uint64, optional, tag = "9")]
102 pub started_at: ::core::option::Option<u64>,
103}
104pub mod worker_node {
106 #[derive(prost_helpers::AnyPB)]
108 #[derive(Clone, PartialEq, ::prost::Message)]
109 pub struct Property {
110 #[prost(bool, tag = "1")]
111 pub is_streaming: bool,
112 #[prost(bool, tag = "2")]
113 pub is_serving: bool,
114 #[prost(bool, tag = "3")]
115 pub is_unschedulable: bool,
116 #[prost(string, tag = "4")]
118 pub internal_rpc_host_addr: ::prost::alloc::string::String,
119 #[prost(uint32, tag = "6")]
120 pub parallelism: u32,
121 #[prost(string, optional, tag = "7")]
123 pub resource_group: ::core::option::Option<::prost::alloc::string::String>,
124 }
125 #[derive(prost_helpers::AnyPB)]
126 #[derive(Clone, PartialEq, ::prost::Message)]
127 pub struct Resource {
128 #[prost(string, tag = "1")]
129 pub rw_version: ::prost::alloc::string::String,
130 #[prost(uint64, tag = "2")]
131 pub total_memory_bytes: u64,
132 #[prost(uint64, tag = "3")]
133 pub total_cpu_cores: u64,
134 #[prost(string, tag = "4")]
137 pub hostname: ::prost::alloc::string::String,
138 }
139 #[derive(prost_helpers::AnyPB)]
140 #[derive(
141 Clone,
142 Copy,
143 Debug,
144 PartialEq,
145 Eq,
146 Hash,
147 PartialOrd,
148 Ord,
149 ::prost::Enumeration
150 )]
151 #[repr(i32)]
152 pub enum State {
153 Unspecified = 0,
154 Starting = 1,
155 Running = 2,
156 }
157 impl State {
158 pub fn as_str_name(&self) -> &'static str {
163 match self {
164 Self::Unspecified => "UNSPECIFIED",
165 Self::Starting => "STARTING",
166 Self::Running => "RUNNING",
167 }
168 }
169 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
171 match value {
172 "UNSPECIFIED" => Some(Self::Unspecified),
173 "STARTING" => Some(Self::Starting),
174 "RUNNING" => Some(Self::Running),
175 _ => None,
176 }
177 }
178 }
179}
180#[derive(prost_helpers::AnyPB)]
181#[derive(Clone, Copy, PartialEq, ::prost::Message)]
182pub struct ClusterResource {
183 #[prost(uint64, tag = "1")]
184 pub total_memory_bytes: u64,
185 #[prost(uint64, tag = "2")]
186 pub total_cpu_cores: u64,
187}
188#[derive(prost_helpers::AnyPB)]
189#[derive(Eq)]
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct Buffer {
192 #[prost(enumeration = "buffer::CompressionType", tag = "1")]
193 pub compression: i32,
194 #[prost(bytes = "vec", tag = "2")]
195 pub body: ::prost::alloc::vec::Vec<u8>,
196}
197pub mod buffer {
199 #[derive(prost_helpers::AnyPB)]
200 #[derive(
201 Clone,
202 Copy,
203 Debug,
204 PartialEq,
205 Eq,
206 Hash,
207 PartialOrd,
208 Ord,
209 ::prost::Enumeration
210 )]
211 #[repr(i32)]
212 pub enum CompressionType {
213 Unspecified = 0,
214 None = 1,
215 }
216 impl CompressionType {
217 pub fn as_str_name(&self) -> &'static str {
222 match self {
223 Self::Unspecified => "UNSPECIFIED",
224 Self::None => "NONE",
225 }
226 }
227 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
229 match value {
230 "UNSPECIFIED" => Some(Self::Unspecified),
231 "NONE" => Some(Self::None),
232 _ => None,
233 }
234 }
235 }
236}
237#[derive(prost_helpers::AnyPB)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct WorkerSlotMapping {
241 #[prost(uint32, repeated, tag = "1")]
242 pub original_indices: ::prost::alloc::vec::Vec<u32>,
243 #[prost(uint64, repeated, tag = "2")]
244 pub data: ::prost::alloc::vec::Vec<u64>,
245}
246#[derive(prost_helpers::AnyPB)]
247#[derive(Clone, Copy, PartialEq, ::prost::Message)]
248pub struct BatchQueryCommittedEpoch {
249 #[prost(uint64, tag = "1")]
250 pub epoch: u64,
251 #[prost(uint64, tag = "2")]
252 pub hummock_version_id: u64,
253}
254#[derive(prost_helpers::AnyPB)]
255#[derive(Clone, Copy, PartialEq, ::prost::Message)]
256pub struct BatchQueryEpoch {
257 #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4")]
258 pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
259}
260pub mod batch_query_epoch {
262 #[derive(prost_helpers::AnyPB)]
263 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
264 pub enum Epoch {
265 #[prost(message, tag = "1")]
266 Committed(super::BatchQueryCommittedEpoch),
267 #[prost(uint64, tag = "2")]
268 Current(u64),
269 #[prost(uint64, tag = "3")]
270 Backup(u64),
271 #[prost(uint64, tag = "4")]
272 TimeTravel(u64),
273 }
274}
275#[derive(prost_helpers::AnyPB)]
276#[derive(Eq, Hash)]
277#[derive(Clone, Copy, PartialEq, ::prost::Message)]
278pub struct OrderType {
279 #[prost(enumeration = "Direction", tag = "1")]
280 pub direction: i32,
281 #[prost(enumeration = "NullsAre", tag = "2")]
282 pub nulls_are: i32,
283}
284#[derive(prost_helpers::AnyPB)]
286#[derive(Eq, Hash)]
287#[derive(Clone, Copy, PartialEq, ::prost::Message)]
288pub struct ColumnOrder {
289 #[prost(uint32, tag = "1")]
290 pub column_index: u32,
291 #[prost(message, optional, tag = "2")]
292 pub order_type: ::core::option::Option<OrderType>,
293}
294#[derive(prost_helpers::AnyPB)]
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct Uint32Vector {
297 #[prost(uint32, repeated, tag = "1")]
298 pub data: ::prost::alloc::vec::Vec<u32>,
299}
300#[derive(prost_helpers::AnyPB)]
301#[derive(Clone, Copy, PartialEq, ::prost::Message)]
302pub struct OptionalUint32 {
303 #[prost(uint32, optional, tag = "1")]
304 pub value: ::core::option::Option<u32>,
305}
306#[derive(prost_helpers::AnyPB)]
307#[derive(Clone, Copy, PartialEq, ::prost::Message)]
308pub struct OptionalUint64 {
309 #[prost(uint64, optional, tag = "1")]
310 pub value: ::core::option::Option<u64>,
311}
312#[derive(prost_helpers::AnyPB)]
313#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
314#[repr(i32)]
315pub enum WorkerType {
316 Unspecified = 0,
317 Frontend = 1,
318 ComputeNode = 2,
319 RiseCtl = 3,
320 Compactor = 4,
321 Meta = 5,
322}
323impl WorkerType {
324 pub fn as_str_name(&self) -> &'static str {
329 match self {
330 Self::Unspecified => "WORKER_TYPE_UNSPECIFIED",
331 Self::Frontend => "WORKER_TYPE_FRONTEND",
332 Self::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
333 Self::RiseCtl => "WORKER_TYPE_RISE_CTL",
334 Self::Compactor => "WORKER_TYPE_COMPACTOR",
335 Self::Meta => "WORKER_TYPE_META",
336 }
337 }
338 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
340 match value {
341 "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
342 "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
343 "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
344 "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
345 "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
346 "WORKER_TYPE_META" => Some(Self::Meta),
347 _ => None,
348 }
349 }
350}
351#[derive(prost_helpers::AnyPB)]
352#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
353#[repr(i32)]
354pub enum Direction {
355 Unspecified = 0,
356 Ascending = 1,
357 Descending = 2,
358}
359impl Direction {
360 pub fn as_str_name(&self) -> &'static str {
365 match self {
366 Self::Unspecified => "DIRECTION_UNSPECIFIED",
367 Self::Ascending => "DIRECTION_ASCENDING",
368 Self::Descending => "DIRECTION_DESCENDING",
369 }
370 }
371 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
373 match value {
374 "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
375 "DIRECTION_ASCENDING" => Some(Self::Ascending),
376 "DIRECTION_DESCENDING" => Some(Self::Descending),
377 _ => None,
378 }
379 }
380}
381#[derive(prost_helpers::AnyPB)]
382#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
383#[repr(i32)]
384pub enum NullsAre {
385 Unspecified = 0,
386 Largest = 1,
387 Smallest = 2,
388}
389impl NullsAre {
390 pub fn as_str_name(&self) -> &'static str {
395 match self {
396 Self::Unspecified => "NULLS_ARE_UNSPECIFIED",
397 Self::Largest => "NULLS_ARE_LARGEST",
398 Self::Smallest => "NULLS_ARE_SMALLEST",
399 }
400 }
401 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
403 match value {
404 "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
405 "NULLS_ARE_LARGEST" => Some(Self::Largest),
406 "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
407 _ => None,
408 }
409 }
410}
411#[derive(prost_helpers::AnyPB)]
412#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
413#[repr(i32)]
414pub enum ObjectType {
415 Unspecified = 0,
416 Database = 1,
417 Schema = 2,
418 Table = 3,
419 Mview = 4,
420 Source = 5,
421 Sink = 6,
422 View = 7,
423 Index = 8,
424 Function = 9,
425 Connection = 10,
426 Subscription = 11,
427 Secret = 12,
428}
429impl ObjectType {
430 pub fn as_str_name(&self) -> &'static str {
435 match self {
436 Self::Unspecified => "UNSPECIFIED",
437 Self::Database => "DATABASE",
438 Self::Schema => "SCHEMA",
439 Self::Table => "TABLE",
440 Self::Mview => "MVIEW",
441 Self::Source => "SOURCE",
442 Self::Sink => "SINK",
443 Self::View => "VIEW",
444 Self::Index => "INDEX",
445 Self::Function => "FUNCTION",
446 Self::Connection => "CONNECTION",
447 Self::Subscription => "SUBSCRIPTION",
448 Self::Secret => "SECRET",
449 }
450 }
451 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
453 match value {
454 "UNSPECIFIED" => Some(Self::Unspecified),
455 "DATABASE" => Some(Self::Database),
456 "SCHEMA" => Some(Self::Schema),
457 "TABLE" => Some(Self::Table),
458 "MVIEW" => Some(Self::Mview),
459 "SOURCE" => Some(Self::Source),
460 "SINK" => Some(Self::Sink),
461 "VIEW" => Some(Self::View),
462 "INDEX" => Some(Self::Index),
463 "FUNCTION" => Some(Self::Function),
464 "CONNECTION" => Some(Self::Connection),
465 "SUBSCRIPTION" => Some(Self::Subscription),
466 "SECRET" => Some(Self::Secret),
467 _ => None,
468 }
469 }
470}
471#[derive(prost_helpers::AnyPB)]
472#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
473#[repr(i32)]
474pub enum DistanceType {
475 Unspecified = 0,
476 L1 = 1,
477 L2Sqr = 2,
478 Cosine = 3,
479 InnerProduct = 4,
480}
481impl DistanceType {
482 pub fn as_str_name(&self) -> &'static str {
487 match self {
488 Self::Unspecified => "DISTANCE_TYPE_UNSPECIFIED",
489 Self::L1 => "DISTANCE_TYPE_L1",
490 Self::L2Sqr => "DISTANCE_TYPE_L2_SQR",
491 Self::Cosine => "DISTANCE_TYPE_COSINE",
492 Self::InnerProduct => "DISTANCE_TYPE_INNER_PRODUCT",
493 }
494 }
495 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
497 match value {
498 "DISTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
499 "DISTANCE_TYPE_L1" => Some(Self::L1),
500 "DISTANCE_TYPE_L2_SQR" => Some(Self::L2Sqr),
501 "DISTANCE_TYPE_COSINE" => Some(Self::Cosine),
502 "DISTANCE_TYPE_INNER_PRODUCT" => Some(Self::InnerProduct),
503 _ => None,
504 }
505 }
506}