fluss/rpc/message/
get_latest_lake_snapshot.rs1use crate::proto;
19use crate::proto::PbTablePath;
20use crate::rpc::api_key::ApiKey;
21use crate::rpc::api_version::ApiVersion;
22use crate::rpc::frame::WriteError;
23use crate::rpc::message::{ReadVersionedType, RequestBody, WriteVersionedType};
24
25use crate::metadata::TablePath;
26use crate::rpc::frame::ReadError;
27
28use crate::{impl_read_version_type, impl_write_version_type};
29use bytes::{Buf, BufMut};
30use prost::Message;
31
32#[derive(Debug)]
33pub struct GetLatestLakeSnapshotRequest {
34 pub inner_request: proto::GetLatestLakeSnapshotRequest,
35}
36
37impl GetLatestLakeSnapshotRequest {
38 pub fn new(table_path: &TablePath) -> Self {
39 let inner_request = proto::GetLatestLakeSnapshotRequest {
40 table_path: PbTablePath {
41 database_name: table_path.database().to_string(),
42 table_name: table_path.table().to_string(),
43 },
44 };
45
46 Self { inner_request }
47 }
48}
49
50impl RequestBody for GetLatestLakeSnapshotRequest {
51 type ResponseBody = proto::GetLatestLakeSnapshotResponse;
52 const API_KEY: ApiKey = ApiKey::GetLatestLakeSnapshot;
53 const REQUEST_VERSION: ApiVersion = ApiVersion(0);
54}
55
56impl_write_version_type!(GetLatestLakeSnapshotRequest);
57impl_read_version_type!(proto::GetLatestLakeSnapshotResponse);