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", wrapper = "crate::id::ActorId")]
66 pub actor_id: crate::id::ActorId,
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", wrapper = "crate::id::WorkerId")]
75 pub worker_node_id: crate::id::WorkerId,
76}
77#[derive(prost_helpers::AnyPB)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct WorkerNode {
80 #[prost(uint32, tag = "1", wrapper = "crate::id::WorkerId")]
81 pub id: crate::id::WorkerId,
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 #[prost(bool, tag = "8")]
126 pub is_iceberg_compactor: bool,
127 }
128 #[derive(prost_helpers::AnyPB)]
129 #[derive(Clone, PartialEq, ::prost::Message)]
130 pub struct Resource {
131 #[prost(string, tag = "1")]
132 pub rw_version: ::prost::alloc::string::String,
133 #[prost(uint64, tag = "2")]
134 pub total_memory_bytes: u64,
135 #[prost(uint64, tag = "3")]
136 pub total_cpu_cores: u64,
137 #[prost(string, tag = "4")]
140 pub hostname: ::prost::alloc::string::String,
141 }
142 #[derive(prost_helpers::AnyPB)]
143 #[derive(
144 Clone,
145 Copy,
146 Debug,
147 PartialEq,
148 Eq,
149 Hash,
150 PartialOrd,
151 Ord,
152 ::prost::Enumeration
153 )]
154 #[repr(i32)]
155 pub enum State {
156 Unspecified = 0,
157 Starting = 1,
158 Running = 2,
159 }
160 impl State {
161 pub fn as_str_name(&self) -> &'static str {
166 match self {
167 Self::Unspecified => "UNSPECIFIED",
168 Self::Starting => "STARTING",
169 Self::Running => "RUNNING",
170 }
171 }
172 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
174 match value {
175 "UNSPECIFIED" => Some(Self::Unspecified),
176 "STARTING" => Some(Self::Starting),
177 "RUNNING" => Some(Self::Running),
178 _ => None,
179 }
180 }
181 }
182}
183#[derive(prost_helpers::AnyPB)]
184#[derive(Clone, Copy, PartialEq, ::prost::Message)]
185pub struct ClusterResource {
186 #[prost(uint64, tag = "1")]
187 pub total_memory_bytes: u64,
188 #[prost(uint64, tag = "2")]
189 pub total_cpu_cores: u64,
190}
191#[derive(prost_helpers::AnyPB)]
192#[derive(Eq)]
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct Buffer {
195 #[prost(enumeration = "buffer::CompressionType", tag = "1")]
196 pub compression: i32,
197 #[prost(bytes = "vec", tag = "2")]
198 pub body: ::prost::alloc::vec::Vec<u8>,
199}
200pub mod buffer {
202 #[derive(prost_helpers::AnyPB)]
203 #[derive(
204 Clone,
205 Copy,
206 Debug,
207 PartialEq,
208 Eq,
209 Hash,
210 PartialOrd,
211 Ord,
212 ::prost::Enumeration
213 )]
214 #[repr(i32)]
215 pub enum CompressionType {
216 Unspecified = 0,
217 None = 1,
218 }
219 impl CompressionType {
220 pub fn as_str_name(&self) -> &'static str {
225 match self {
226 Self::Unspecified => "UNSPECIFIED",
227 Self::None => "NONE",
228 }
229 }
230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
232 match value {
233 "UNSPECIFIED" => Some(Self::Unspecified),
234 "NONE" => Some(Self::None),
235 _ => None,
236 }
237 }
238 }
239}
240#[derive(prost_helpers::AnyPB)]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct WorkerSlotMapping {
244 #[prost(uint32, repeated, tag = "1")]
245 pub original_indices: ::prost::alloc::vec::Vec<u32>,
246 #[prost(uint64, repeated, tag = "2")]
247 pub data: ::prost::alloc::vec::Vec<u64>,
248}
249#[derive(prost_helpers::AnyPB)]
250#[derive(Clone, Copy, PartialEq, ::prost::Message)]
251pub struct BatchQueryCommittedEpoch {
252 #[prost(uint64, tag = "1")]
253 pub epoch: u64,
254 #[prost(uint64, tag = "2")]
255 pub hummock_version_id: u64,
256}
257#[derive(prost_helpers::AnyPB)]
258#[derive(Clone, Copy, PartialEq, ::prost::Message)]
259pub struct BatchQueryEpoch {
260 #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4")]
261 pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
262}
263pub mod batch_query_epoch {
265 #[derive(prost_helpers::AnyPB)]
266 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
267 pub enum Epoch {
268 #[prost(message, tag = "1")]
269 Committed(super::BatchQueryCommittedEpoch),
270 #[prost(uint64, tag = "2")]
271 Current(u64),
272 #[prost(uint64, tag = "3")]
273 Backup(u64),
274 #[prost(uint64, tag = "4")]
275 TimeTravel(u64),
276 }
277}
278#[derive(prost_helpers::AnyPB)]
279#[derive(Eq, Hash)]
280#[derive(Clone, Copy, PartialEq, ::prost::Message)]
281pub struct OrderType {
282 #[prost(enumeration = "Direction", tag = "1")]
283 pub direction: i32,
284 #[prost(enumeration = "NullsAre", tag = "2")]
285 pub nulls_are: i32,
286}
287#[derive(prost_helpers::AnyPB)]
289#[derive(Eq, Hash)]
290#[derive(Clone, Copy, PartialEq, ::prost::Message)]
291pub struct ColumnOrder {
292 #[prost(uint32, tag = "1")]
293 pub column_index: u32,
294 #[prost(message, optional, tag = "2")]
295 pub order_type: ::core::option::Option<OrderType>,
296}
297#[derive(prost_helpers::AnyPB)]
298#[derive(Clone, PartialEq, ::prost::Message)]
299pub struct Uint32Vector {
300 #[prost(uint32, repeated, tag = "1")]
301 pub data: ::prost::alloc::vec::Vec<u32>,
302}
303#[derive(prost_helpers::AnyPB)]
304#[derive(Clone, Copy, PartialEq, ::prost::Message)]
305pub struct OptionalUint32 {
306 #[prost(uint32, optional, tag = "1")]
307 pub value: ::core::option::Option<u32>,
308}
309#[derive(prost_helpers::AnyPB)]
310#[derive(Clone, Copy, PartialEq, ::prost::Message)]
311pub struct OptionalUint64 {
312 #[prost(uint64, optional, tag = "1")]
313 pub value: ::core::option::Option<u64>,
314}
315#[derive(prost_helpers::AnyPB)]
316#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
317#[repr(i32)]
318pub enum WorkerType {
319 Unspecified = 0,
320 Frontend = 1,
321 ComputeNode = 2,
322 RiseCtl = 3,
323 Compactor = 4,
324 Meta = 5,
325}
326impl WorkerType {
327 pub fn as_str_name(&self) -> &'static str {
332 match self {
333 Self::Unspecified => "WORKER_TYPE_UNSPECIFIED",
334 Self::Frontend => "WORKER_TYPE_FRONTEND",
335 Self::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
336 Self::RiseCtl => "WORKER_TYPE_RISE_CTL",
337 Self::Compactor => "WORKER_TYPE_COMPACTOR",
338 Self::Meta => "WORKER_TYPE_META",
339 }
340 }
341 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
343 match value {
344 "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
345 "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
346 "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
347 "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
348 "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
349 "WORKER_TYPE_META" => Some(Self::Meta),
350 _ => None,
351 }
352 }
353}
354#[derive(prost_helpers::AnyPB)]
355#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
356#[repr(i32)]
357pub enum Direction {
358 Unspecified = 0,
359 Ascending = 1,
360 Descending = 2,
361}
362impl Direction {
363 pub fn as_str_name(&self) -> &'static str {
368 match self {
369 Self::Unspecified => "DIRECTION_UNSPECIFIED",
370 Self::Ascending => "DIRECTION_ASCENDING",
371 Self::Descending => "DIRECTION_DESCENDING",
372 }
373 }
374 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
376 match value {
377 "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
378 "DIRECTION_ASCENDING" => Some(Self::Ascending),
379 "DIRECTION_DESCENDING" => Some(Self::Descending),
380 _ => None,
381 }
382 }
383}
384#[derive(prost_helpers::AnyPB)]
385#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
386#[repr(i32)]
387pub enum NullsAre {
388 Unspecified = 0,
389 Largest = 1,
390 Smallest = 2,
391}
392impl NullsAre {
393 pub fn as_str_name(&self) -> &'static str {
398 match self {
399 Self::Unspecified => "NULLS_ARE_UNSPECIFIED",
400 Self::Largest => "NULLS_ARE_LARGEST",
401 Self::Smallest => "NULLS_ARE_SMALLEST",
402 }
403 }
404 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
406 match value {
407 "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
408 "NULLS_ARE_LARGEST" => Some(Self::Largest),
409 "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
410 _ => None,
411 }
412 }
413}
414#[derive(prost_helpers::AnyPB)]
415#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
416#[repr(i32)]
417pub enum ObjectType {
418 Unspecified = 0,
419 Database = 1,
420 Schema = 2,
421 Table = 3,
422 Mview = 4,
423 Source = 5,
424 Sink = 6,
425 View = 7,
426 Index = 8,
427 Function = 9,
428 Connection = 10,
429 Subscription = 11,
430 Secret = 12,
431}
432impl ObjectType {
433 pub fn as_str_name(&self) -> &'static str {
438 match self {
439 Self::Unspecified => "UNSPECIFIED",
440 Self::Database => "DATABASE",
441 Self::Schema => "SCHEMA",
442 Self::Table => "TABLE",
443 Self::Mview => "MVIEW",
444 Self::Source => "SOURCE",
445 Self::Sink => "SINK",
446 Self::View => "VIEW",
447 Self::Index => "INDEX",
448 Self::Function => "FUNCTION",
449 Self::Connection => "CONNECTION",
450 Self::Subscription => "SUBSCRIPTION",
451 Self::Secret => "SECRET",
452 }
453 }
454 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
456 match value {
457 "UNSPECIFIED" => Some(Self::Unspecified),
458 "DATABASE" => Some(Self::Database),
459 "SCHEMA" => Some(Self::Schema),
460 "TABLE" => Some(Self::Table),
461 "MVIEW" => Some(Self::Mview),
462 "SOURCE" => Some(Self::Source),
463 "SINK" => Some(Self::Sink),
464 "VIEW" => Some(Self::View),
465 "INDEX" => Some(Self::Index),
466 "FUNCTION" => Some(Self::Function),
467 "CONNECTION" => Some(Self::Connection),
468 "SUBSCRIPTION" => Some(Self::Subscription),
469 "SECRET" => Some(Self::Secret),
470 _ => None,
471 }
472 }
473}
474#[derive(prost_helpers::AnyPB)]
475#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
476#[repr(i32)]
477pub enum DistanceType {
478 Unspecified = 0,
479 L1 = 1,
480 L2Sqr = 2,
481 Cosine = 3,
482 InnerProduct = 4,
483}
484impl DistanceType {
485 pub fn as_str_name(&self) -> &'static str {
490 match self {
491 Self::Unspecified => "DISTANCE_TYPE_UNSPECIFIED",
492 Self::L1 => "DISTANCE_TYPE_L1",
493 Self::L2Sqr => "DISTANCE_TYPE_L2_SQR",
494 Self::Cosine => "DISTANCE_TYPE_COSINE",
495 Self::InnerProduct => "DISTANCE_TYPE_INNER_PRODUCT",
496 }
497 }
498 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
500 match value {
501 "DISTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
502 "DISTANCE_TYPE_L1" => Some(Self::L1),
503 "DISTANCE_TYPE_L2_SQR" => Some(Self::L2Sqr),
504 "DISTANCE_TYPE_COSINE" => Some(Self::Cosine),
505 "DISTANCE_TYPE_INNER_PRODUCT" => Some(Self::InnerProduct),
506 _ => None,
507 }
508 }
509}