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 }
135 #[derive(prost_helpers::AnyPB)]
136 #[derive(
137 Clone,
138 Copy,
139 Debug,
140 PartialEq,
141 Eq,
142 Hash,
143 PartialOrd,
144 Ord,
145 ::prost::Enumeration
146 )]
147 #[repr(i32)]
148 pub enum State {
149 Unspecified = 0,
150 Starting = 1,
151 Running = 2,
152 }
153 impl State {
154 pub fn as_str_name(&self) -> &'static str {
159 match self {
160 Self::Unspecified => "UNSPECIFIED",
161 Self::Starting => "STARTING",
162 Self::Running => "RUNNING",
163 }
164 }
165 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
167 match value {
168 "UNSPECIFIED" => Some(Self::Unspecified),
169 "STARTING" => Some(Self::Starting),
170 "RUNNING" => Some(Self::Running),
171 _ => None,
172 }
173 }
174 }
175}
176#[derive(prost_helpers::AnyPB)]
177#[derive(Eq)]
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct Buffer {
180 #[prost(enumeration = "buffer::CompressionType", tag = "1")]
181 pub compression: i32,
182 #[prost(bytes = "vec", tag = "2")]
183 pub body: ::prost::alloc::vec::Vec<u8>,
184}
185pub mod buffer {
187 #[derive(prost_helpers::AnyPB)]
188 #[derive(
189 Clone,
190 Copy,
191 Debug,
192 PartialEq,
193 Eq,
194 Hash,
195 PartialOrd,
196 Ord,
197 ::prost::Enumeration
198 )]
199 #[repr(i32)]
200 pub enum CompressionType {
201 Unspecified = 0,
202 None = 1,
203 }
204 impl CompressionType {
205 pub fn as_str_name(&self) -> &'static str {
210 match self {
211 Self::Unspecified => "UNSPECIFIED",
212 Self::None => "NONE",
213 }
214 }
215 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
217 match value {
218 "UNSPECIFIED" => Some(Self::Unspecified),
219 "NONE" => Some(Self::None),
220 _ => None,
221 }
222 }
223 }
224}
225#[derive(prost_helpers::AnyPB)]
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct WorkerSlotMapping {
229 #[prost(uint32, repeated, tag = "1")]
230 pub original_indices: ::prost::alloc::vec::Vec<u32>,
231 #[prost(uint64, repeated, tag = "2")]
232 pub data: ::prost::alloc::vec::Vec<u64>,
233}
234#[derive(prost_helpers::AnyPB)]
235#[derive(Clone, Copy, PartialEq, ::prost::Message)]
236pub struct BatchQueryCommittedEpoch {
237 #[prost(uint64, tag = "1")]
238 pub epoch: u64,
239 #[prost(uint64, tag = "2")]
240 pub hummock_version_id: u64,
241}
242#[derive(prost_helpers::AnyPB)]
243#[derive(Clone, Copy, PartialEq, ::prost::Message)]
244pub struct BatchQueryEpoch {
245 #[prost(oneof = "batch_query_epoch::Epoch", tags = "1, 2, 3, 4")]
246 pub epoch: ::core::option::Option<batch_query_epoch::Epoch>,
247}
248pub mod batch_query_epoch {
250 #[derive(prost_helpers::AnyPB)]
251 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
252 pub enum Epoch {
253 #[prost(message, tag = "1")]
254 Committed(super::BatchQueryCommittedEpoch),
255 #[prost(uint64, tag = "2")]
256 Current(u64),
257 #[prost(uint64, tag = "3")]
258 Backup(u64),
259 #[prost(uint64, tag = "4")]
260 TimeTravel(u64),
261 }
262}
263#[derive(prost_helpers::AnyPB)]
264#[derive(Eq, Hash)]
265#[derive(Clone, Copy, PartialEq, ::prost::Message)]
266pub struct OrderType {
267 #[prost(enumeration = "Direction", tag = "1")]
268 pub direction: i32,
269 #[prost(enumeration = "NullsAre", tag = "2")]
270 pub nulls_are: i32,
271}
272#[derive(prost_helpers::AnyPB)]
274#[derive(Eq, Hash)]
275#[derive(Clone, Copy, PartialEq, ::prost::Message)]
276pub struct ColumnOrder {
277 #[prost(uint32, tag = "1")]
278 pub column_index: u32,
279 #[prost(message, optional, tag = "2")]
280 pub order_type: ::core::option::Option<OrderType>,
281}
282#[derive(prost_helpers::AnyPB)]
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct Uint32Vector {
285 #[prost(uint32, repeated, tag = "1")]
286 pub data: ::prost::alloc::vec::Vec<u32>,
287}
288#[derive(prost_helpers::AnyPB)]
289#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
290#[repr(i32)]
291pub enum WorkerType {
292 Unspecified = 0,
293 Frontend = 1,
294 ComputeNode = 2,
295 RiseCtl = 3,
296 Compactor = 4,
297 Meta = 5,
298}
299impl WorkerType {
300 pub fn as_str_name(&self) -> &'static str {
305 match self {
306 Self::Unspecified => "WORKER_TYPE_UNSPECIFIED",
307 Self::Frontend => "WORKER_TYPE_FRONTEND",
308 Self::ComputeNode => "WORKER_TYPE_COMPUTE_NODE",
309 Self::RiseCtl => "WORKER_TYPE_RISE_CTL",
310 Self::Compactor => "WORKER_TYPE_COMPACTOR",
311 Self::Meta => "WORKER_TYPE_META",
312 }
313 }
314 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
316 match value {
317 "WORKER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
318 "WORKER_TYPE_FRONTEND" => Some(Self::Frontend),
319 "WORKER_TYPE_COMPUTE_NODE" => Some(Self::ComputeNode),
320 "WORKER_TYPE_RISE_CTL" => Some(Self::RiseCtl),
321 "WORKER_TYPE_COMPACTOR" => Some(Self::Compactor),
322 "WORKER_TYPE_META" => Some(Self::Meta),
323 _ => None,
324 }
325 }
326}
327#[derive(prost_helpers::AnyPB)]
328#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
329#[repr(i32)]
330pub enum Direction {
331 Unspecified = 0,
332 Ascending = 1,
333 Descending = 2,
334}
335impl Direction {
336 pub fn as_str_name(&self) -> &'static str {
341 match self {
342 Self::Unspecified => "DIRECTION_UNSPECIFIED",
343 Self::Ascending => "DIRECTION_ASCENDING",
344 Self::Descending => "DIRECTION_DESCENDING",
345 }
346 }
347 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
349 match value {
350 "DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
351 "DIRECTION_ASCENDING" => Some(Self::Ascending),
352 "DIRECTION_DESCENDING" => Some(Self::Descending),
353 _ => None,
354 }
355 }
356}
357#[derive(prost_helpers::AnyPB)]
358#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
359#[repr(i32)]
360pub enum NullsAre {
361 Unspecified = 0,
362 Largest = 1,
363 Smallest = 2,
364}
365impl NullsAre {
366 pub fn as_str_name(&self) -> &'static str {
371 match self {
372 Self::Unspecified => "NULLS_ARE_UNSPECIFIED",
373 Self::Largest => "NULLS_ARE_LARGEST",
374 Self::Smallest => "NULLS_ARE_SMALLEST",
375 }
376 }
377 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
379 match value {
380 "NULLS_ARE_UNSPECIFIED" => Some(Self::Unspecified),
381 "NULLS_ARE_LARGEST" => Some(Self::Largest),
382 "NULLS_ARE_SMALLEST" => Some(Self::Smallest),
383 _ => None,
384 }
385 }
386}