diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index 0c83ece0604..256a997b603 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -362,6 +362,8 @@ prost-derive,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert , Lucio Franco , Casper Meijn , Tokio Contributors " protobuf,https://github.com/stepancheg/rust-protobuf,MIT,Stepan Koltsov protobuf-support,https://github.com/stepancheg/rust-protobuf,MIT,Stepan Koltsov +pulldown-cmark,https://github.com/raphlinus/pulldown-cmark,MIT,"Raph Levien , Marcus Klaas de Vries " +pulldown-cmark-to-cmark,https://github.com/Byron/pulldown-cmark-to-cmark,Apache-2.0,"Sebastian Thiel , Dylan Owen , Alessandro Ogier , Zixian Cai <2891235+caizixian@users.noreply.github.com>, Andrew Lyjak " quanta,https://github.com/metrics-rs/quanta,MIT,Toby Lawrence quick-error,http://github.com/tailhook/quick-error,MIT OR Apache-2.0,"Paul Colomiets , Colin Kiegel " quinn,https://github.com/quinn-rs/quinn,MIT OR Apache-2.0,The quinn Authors @@ -495,6 +497,8 @@ toml_writer,https://github.com/toml-rs/toml,MIT OR Apache-2.0,The toml_writer Au tonic,https://github.com/hyperium/tonic,MIT,Lucio Franco tonic-build,https://github.com/hyperium/tonic,MIT,Lucio Franco tonic-health,https://github.com/hyperium/tonic,MIT,James Nugent +tonic-prost,https://github.com/hyperium/tonic,MIT,Lucio Franco +tonic-prost-build,https://github.com/hyperium/tonic,MIT,Lucio Franco tonic-reflection,https://github.com/hyperium/tonic,MIT,"James Nugent , Samani G. Gikandi " tower,https://github.com/tower-rs/tower,MIT,Tower Maintainers tower-http,https://github.com/tower-rs/tower-http,MIT,Tower Maintainers diff --git a/quickwit/Cargo.lock b/quickwit/Cargo.lock index 33364f68b04..8c2370b74b6 100644 --- a/quickwit/Cargo.lock +++ b/quickwit/Cargo.lock @@ -6559,6 +6559,16 @@ dependencies = [ "prost-derive 0.13.5", ] +[[package]] +name = "prost" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +dependencies = [ + "bytes", + "prost-derive 0.14.1", +] + [[package]] name = "prost-build" version = "0.13.5" @@ -6579,6 +6589,28 @@ dependencies = [ "tempfile", ] +[[package]] +name = "prost-build" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" +dependencies = [ + "heck 0.5.0", + "itertools 0.14.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost 0.14.1", + "prost-types 0.14.1", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 2.0.111", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -6605,6 +6637,19 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "prost-derive" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +dependencies = [ + "anyhow", + "itertools 0.14.0", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "prost-reflect" version = "0.14.7" @@ -6634,6 +6679,15 @@ dependencies = [ "prost 0.13.5", ] +[[package]] +name = "prost-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" +dependencies = [ + "prost 0.14.1", +] + [[package]] name = "protobuf" version = "3.7.2" @@ -6679,6 +6733,26 @@ dependencies = [ "psl-types", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +dependencies = [ + "bitflags 2.10.0", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "21.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8246feae3db61428fd0bb94285c690b460e4517d83152377543ca802357785f1" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "pulsar" version = "6.6.0" @@ -6702,7 +6776,7 @@ dependencies = [ "openidconnect", "pem 3.0.6", "prost 0.13.5", - "prost-build", + "prost-build 0.13.5", "prost-derive 0.13.5", "rand 0.8.5", "regex", @@ -6884,7 +6958,7 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", "tracing", "utoipa", ] @@ -6898,11 +6972,12 @@ dependencies = [ "heck 0.5.0", "prettyplease", "proc-macro2", - "prost-build", + "prost-build 0.14.1", "quote", "serde", "syn 2.0.111", "tonic-build", + "tonic-prost-build", ] [[package]] @@ -6915,7 +6990,7 @@ dependencies = [ "futures", "http 1.4.0", "mockall", - "prost 0.13.5", + "prost 0.14.1", "quickwit-actors", "quickwit-codegen", "quickwit-common", @@ -6924,7 +6999,8 @@ dependencies = [ "thiserror 2.0.17", "tokio", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", + "tonic-prost", "tower 0.5.2", "utoipa", ] @@ -6969,7 +7045,7 @@ dependencies = [ "tokio", "tokio-metrics", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", "tower 0.5.2", "tracing", ] @@ -7151,7 +7227,7 @@ dependencies = [ "openssl", "percent-encoding", "proptest", - "prost 0.13.5", + "prost 0.14.1", "pulsar", "quickwit-actors", "quickwit-aws", @@ -7200,7 +7276,7 @@ dependencies = [ "mockall", "mrecordlog", "once_cell", - "prost 0.13.5", + "prost 0.14.1", "quickwit-actors", "quickwit-cluster", "quickwit-codegen", @@ -7216,7 +7292,8 @@ dependencies = [ "tempfile", "thiserror 2.0.17", "tokio", - "tonic 0.13.1", + "tonic 0.14.2", + "tonic-prost", "tower 0.5.2", "tracing", "ulid", @@ -7250,7 +7327,7 @@ dependencies = [ "serde_json", "tempfile", "tokio", - "tonic 0.13.1", + "tonic 0.14.2", "tracing", "tracing-subscriber", ] @@ -7263,8 +7340,8 @@ dependencies = [ "itertools 0.14.0", "once_cell", "postcard", - "prost 0.13.5", - "prost-types 0.13.5", + "prost 0.14.1", + "prost-types 0.14.1", "quickwit-actors", "quickwit-cluster", "quickwit-common", @@ -7284,7 +7361,7 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", "tracing", ] @@ -7383,7 +7460,7 @@ dependencies = [ "async-trait", "hex", "once_cell", - "prost 0.13.5", + "prost 0.14.1", "quickwit-common", "quickwit-config", "quickwit-ingest", @@ -7394,7 +7471,7 @@ dependencies = [ "thiserror 2.0.17", "time", "tokio", - "tonic 0.13.1", + "tonic 0.14.2", "tracing", ] @@ -7412,9 +7489,9 @@ dependencies = [ "http 1.4.0", "mockall", "opentelemetry", - "prost 0.13.5", - "prost-build", - "prost-types 0.13.5", + "prost 0.14.1", + "prost-build 0.14.1", + "prost-types 0.14.1", "quickwit-actors", "quickwit-codegen", "quickwit-common", @@ -7424,8 +7501,10 @@ dependencies = [ "sqlx", "thiserror 2.0.17", "tokio", - "tonic 0.13.1", + "tonic 0.14.2", "tonic-build", + "tonic-prost", + "tonic-prost-build", "tower 0.5.2", "tracing", "tracing-opentelemetry", @@ -7510,7 +7589,7 @@ dependencies = [ "pin-project", "postcard", "proptest", - "prost 0.13.5", + "prost 0.14.1", "quickwit-common", "quickwit-config", "quickwit-directories", @@ -7569,8 +7648,8 @@ dependencies = [ "opentelemetry", "percent-encoding", "pprof", - "prost 0.13.5", - "prost-types 0.13.5", + "prost 0.14.1", + "prost-types 0.14.1", "quickwit-actors", "quickwit-cluster", "quickwit-common", @@ -7604,7 +7683,7 @@ dependencies = [ "tokio-rustls 0.26.4", "tokio-stream", "tokio-util", - "tonic 0.13.1", + "tonic 0.14.2", "tonic-health", "tonic-reflection", "tower 0.5.2", @@ -10377,9 +10456,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" +checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ "async-trait", "axum 0.8.7", @@ -10395,9 +10474,9 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.5", "rustls-native-certs", - "socket2 0.5.10", + "socket2 0.6.1", + "sync_wrapper 1.0.2", "tokio", "tokio-rustls 0.26.4", "tokio-stream", @@ -10410,41 +10489,68 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac6f67be712d12f0b41328db3137e0d0757645d8904b4cb7d51cd9c2279e847" +checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types 0.13.5", "quote", "syn 2.0.111", ] [[package]] name = "tonic-health" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb87334d340313fefa513b6e60794d44a86d5f039b523229c99c323e4e19ca4b" +checksum = "2a82868bf299e0a1d2e8dce0dc33a46c02d6f045b2c1f1d6cc8dc3d0bf1812ef" dependencies = [ - "prost 0.13.5", + "prost 0.14.1", "tokio", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", + "tonic-prost", +] + +[[package]] +name = "tonic-prost" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +dependencies = [ + "bytes", + "prost 0.14.1", + "tonic 0.14.2", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build 0.14.1", + "prost-types 0.14.1", + "quote", + "syn 2.0.111", + "tempfile", + "tonic-build", ] [[package]] name = "tonic-reflection" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9687bd5bfeafebdded2356950f278bba8226f0b32109537c4253406e09aafe1" +checksum = "34da53e8387581d66db16ff01f98a70b426b091fdf76856e289d5c1bd386ed7b" dependencies = [ - "prost 0.13.5", - "prost-types 0.13.5", + "prost 0.14.1", + "prost-types 0.14.1", "tokio", "tokio-stream", - "tonic 0.13.1", + "tonic 0.14.2", + "tonic-prost", ] [[package]] diff --git a/quickwit/Cargo.toml b/quickwit/Cargo.toml index 00463281a14..70d86a3443f 100644 --- a/quickwit/Cargo.toml +++ b/quickwit/Cargo.toml @@ -174,11 +174,11 @@ prettyplease = "0.2" proc-macro2 = "1.0" prometheus = { version = "0.14", features = ["process"] } proptest = "1" -prost = { version = "0.13", default-features = false, features = [ - "prost-derive", +prost = { version = "0.14", default-features = false, features = [ + "derive", ] } -prost-build = "0.13" -prost-types = "0.13" +prost-build = "0.14" +prost-types = "0.14" pulsar = { version = "6.6", default-features = false, features = [ "auth-oauth2", "compression", @@ -244,15 +244,17 @@ tokio-rustls = { version = "0.26", default-features = false } tokio-stream = { version = "0.1", features = ["sync"] } tokio-util = { version = "0.7", features = ["full"] } toml = "0.9" -tonic = { version = "0.13", features = [ +tonic = { version = "0.14", features = [ "_tls-any", "gzip", "tls-native-roots", "zstd", ] } -tonic-build = "0.13" -tonic-health = "0.13" -tonic-reflection = "0.13" +tonic-build = "0.14" +tonic-health = "0.14" +tonic-prost = "0.14" +tonic-prost-build = "0.14" +tonic-reflection = "0.14" tower = { version = "0.5", features = [ "balance", "buffer", diff --git a/quickwit/quickwit-codegen/Cargo.toml b/quickwit/quickwit-codegen/Cargo.toml index 3063293e0ac..21ae245b16c 100644 --- a/quickwit/quickwit-codegen/Cargo.toml +++ b/quickwit/quickwit-codegen/Cargo.toml @@ -19,6 +19,7 @@ prost-build = { workspace = true } quote = { workspace = true } syn = { workspace = true } tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } [dev-dependencies] futures = { workspace = true } diff --git a/quickwit/quickwit-codegen/example/Cargo.toml b/quickwit/quickwit-codegen/example/Cargo.toml index e6380b1fb20..0d21ff6bf9e 100644 --- a/quickwit/quickwit-codegen/example/Cargo.toml +++ b/quickwit/quickwit-codegen/example/Cargo.toml @@ -23,6 +23,7 @@ thiserror = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } tonic = { workspace = true } +tonic-prost = { workspace = true } tower = { workspace = true } utoipa = { workspace = true } diff --git a/quickwit/quickwit-codegen/example/src/codegen/hello.rs b/quickwit/quickwit-codegen/example/src/codegen/hello.rs index 8f1f59a4a18..bacf8b3edac 100644 --- a/quickwit/quickwit-codegen/example/src/codegen/hello.rs +++ b/quickwit/quickwit-codegen/example/src/codegen/hello.rs @@ -1,36 +1,36 @@ // This file is @generated by prost-build. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct HelloRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct HelloResponse { #[prost(string, tag = "1")] pub message: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GoodbyeRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GoodbyeResponse { #[prost(string, tag = "1")] pub message: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PingRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PingResponse { #[prost(string, tag = "1")] pub message: ::prost::alloc::string::String, @@ -59,14 +59,14 @@ pub type HelloStream = quickwit_common::ServiceStream>; #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait Hello: std::fmt::Debug + Send + Sync + 'static { - /// Says hello. + ///Says hello. async fn hello(&self, request: HelloRequest) -> crate::HelloResult; - /// Says goodbye. + ///Says goodbye. async fn goodbye( &self, request: GoodbyeRequest, ) -> crate::HelloResult; - /// Ping pong. + ///Ping pong. async fn ping( &self, request: quickwit_common::ServiceStream, @@ -964,7 +964,7 @@ pub mod hello_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/hello.Hello/Hello"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("hello.Hello", "Hello")); @@ -986,7 +986,7 @@ pub mod hello_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/hello.Hello/Goodbye"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("hello.Hello", "Goodbye")); @@ -1008,7 +1008,7 @@ pub mod hello_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/hello.Hello/Ping"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("hello.Hello", "Ping")); @@ -1155,7 +1155,7 @@ pub mod hello_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = HelloSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1198,7 +1198,7 @@ pub mod hello_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = GoodbyeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1244,7 +1244,7 @@ pub mod hello_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = PingSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-codegen/src/codegen.rs b/quickwit/quickwit-codegen/src/codegen.rs index 8c6249f6190..a7d6d311be0 100644 --- a/quickwit/quickwit-codegen/src/codegen.rs +++ b/quickwit/quickwit-codegen/src/codegen.rs @@ -138,7 +138,7 @@ impl QuickwitServiceGenerator { ) -> Self { let inner = Box::new(WithSuffixServiceGenerator::new( "Grpc", - tonic_build::configure().service_generator(), + tonic_prost_build::configure().service_generator(), )); Self { result_type_path, diff --git a/quickwit/quickwit-ingest/Cargo.toml b/quickwit/quickwit-ingest/Cargo.toml index 5ac233859f8..ada0add0bc8 100644 --- a/quickwit/quickwit-ingest/Cargo.toml +++ b/quickwit/quickwit-ingest/Cargo.toml @@ -30,6 +30,7 @@ serde_json_borrow = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } tonic = { workspace = true } +tonic-prost = { workspace = true } tower = { workspace = true } tracing = { workspace = true } ulid = { workspace = true } diff --git a/quickwit/quickwit-ingest/src/codegen/ingest_service.rs b/quickwit/quickwit-ingest/src/codegen/ingest_service.rs index f08918078bd..435c9b6d2f9 100644 --- a/quickwit/quickwit-ingest/src/codegen/ingest_service.rs +++ b/quickwit/quickwit-ingest/src/codegen/ingest_service.rs @@ -1,24 +1,24 @@ // This file is @generated by prost-build. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct QueueExistsRequest { #[prost(string, tag = "1")] pub queue_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateQueueRequest { #[prost(string, tag = "1")] pub queue_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateQueueIfNotExistsRequest { #[prost(string, tag = "1")] pub queue_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateQueueIfNotExistsResponse { #[prost(string, tag = "1")] pub queue_id: ::prost::alloc::string::String, @@ -26,7 +26,7 @@ pub struct CreateQueueIfNotExistsResponse { pub created: bool, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DropQueueRequest { #[prost(string, tag = "1")] pub queue_id: ::prost::alloc::string::String, @@ -40,14 +40,14 @@ pub struct IngestRequest { pub commit: i32, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IngestResponse { #[prost(uint64, tag = "1")] pub num_docs_for_processing: u64, } /// Fetch messages with position strictly after `start_after`. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchRequest { #[prost(string, tag = "1")] pub index_id: ::prost::alloc::string::String, @@ -57,7 +57,7 @@ pub struct FetchRequest { pub num_bytes_limit: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchResponse { #[prost(uint64, optional, tag = "1")] pub first_position: ::core::option::Option, @@ -65,7 +65,7 @@ pub struct FetchResponse { pub doc_batch: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DocBatch { #[prost(string, tag = "1")] pub index_id: ::prost::alloc::string::String, @@ -89,7 +89,7 @@ pub struct DocBatch { /// earlier than this position can yield undefined result: /// the truncated records may or may not be returned. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SuggestTruncateRequest { #[prost(string, tag = "1")] pub index_id: ::prost::alloc::string::String, @@ -97,16 +97,16 @@ pub struct SuggestTruncateRequest { pub up_to_position_included: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TailRequest { #[prost(string, tag = "1")] pub index_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListQueuesRequest {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListQueuesResponse { #[prost(string, repeated, tag = "1")] pub queues: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -170,30 +170,31 @@ impl RpcName for TailRequest { #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait IngestService: std::fmt::Debug + Send + Sync + 'static { - /// Ingests document in a given queue. + ///Ingests document in a given queue. /// - /// Upon any kind of error, the client should - /// - retry to get at least once delivery. - /// - not retry to get at most once delivery. + ///Upon any kind of error, the client should /// - /// Exactly once delivery is not supported yet. + ///* retry to get at least once delivery. + ///* not retry to get at most once delivery. + /// + ///Exactly once delivery is not supported yet. async fn ingest(&self, request: IngestRequest) -> crate::Result; - /// Fetches record from a given queue. + ///Fetches record from a given queue. /// - /// Records are returned in order. + ///Records are returned in order. /// - /// The returned `FetchResponse` object is meant to be read with the - /// `crate::iter_records` function. + ///The returned `FetchResponse` object is meant to be read with the + ///`crate::iter_records` function. /// - /// Fetching does not necessarily return all of the available records. - /// If returning all records would exceed `FETCH_PAYLOAD_LIMIT` (2MB), - /// the response will be partial. + ///Fetching does not necessarily return all of the available records. + ///If returning all records would exceed `FETCH_PAYLOAD_LIMIT` (2MB), + ///the response will be partial. async fn fetch(&self, request: FetchRequest) -> crate::Result; - /// Returns a batch containing the last records. + ///Returns a batch containing the last records. /// - /// It returns the last documents, from the newest - /// to the oldest, and stops as soon as `FETCH_PAYLOAD_LIMIT` (2MB) - /// is exceeded. + ///It returns the last documents, from the newest + ///to the oldest, and stops as soon as `FETCH_PAYLOAD_LIMIT` (2MB) + ///is exceeded. async fn tail(&self, request: TailRequest) -> crate::Result; } #[derive(Debug, Clone)] @@ -1009,8 +1010,9 @@ pub mod ingest_service_grpc_client { /// Ingests document in a given queue. /// /// Upon any kind of error, the client should - /// - retry to get at least once delivery. - /// - not retry to get at most once delivery. + /// + /// * retry to get at least once delivery. + /// * not retry to get at most once delivery. /// /// Exactly once delivery is not supported yet. pub async fn ingest( @@ -1025,7 +1027,7 @@ pub mod ingest_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/ingest_service.IngestService/Ingest", ); @@ -1056,7 +1058,7 @@ pub mod ingest_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/ingest_service.IngestService/Fetch", ); @@ -1082,7 +1084,7 @@ pub mod ingest_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/ingest_service.IngestService/Tail", ); @@ -1109,8 +1111,9 @@ pub mod ingest_service_grpc_server { /// Ingests document in a given queue. /// /// Upon any kind of error, the client should - /// - retry to get at least once delivery. - /// - not retry to get at most once delivery. + /// + /// * retry to get at least once delivery. + /// * not retry to get at most once delivery. /// /// Exactly once delivery is not supported yet. async fn ingest( @@ -1247,7 +1250,7 @@ pub mod ingest_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = IngestSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1291,7 +1294,7 @@ pub mod ingest_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = FetchSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1335,7 +1338,7 @@ pub mod ingest_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = TailSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/Cargo.toml b/quickwit/quickwit-proto/Cargo.toml index 1d68bc539a0..753d62b196d 100644 --- a/quickwit/quickwit-proto/Cargo.toml +++ b/quickwit/quickwit-proto/Cargo.toml @@ -32,6 +32,7 @@ tonic = { workspace = true, features = [ "server", "channel", ] } +tonic-prost = { workspace = true } tower = { workspace = true } tracing = { workspace = true } tracing-opentelemetry = { workspace = true } @@ -50,6 +51,7 @@ mockall = { workspace = true } glob = "0.3" prost-build = { workspace = true } tonic-build = { workspace = true } +tonic-prost-build = { workspace = true } quickwit-codegen = { workspace = true } diff --git a/quickwit/quickwit-proto/build.rs b/quickwit/quickwit-proto/build.rs index 2dd109cf533..569d9b5315b 100644 --- a/quickwit/quickwit-proto/build.rs +++ b/quickwit/quickwit-proto/build.rs @@ -147,7 +147,6 @@ fn main() -> Result<(), Box> { .extern_path(".quickwit.common.IndexUid", "crate::types::IndexUid") .extern_path(".quickwit.ingest.Position", "crate::types::Position") .extern_path(".quickwit.ingest.ShardId", "crate::types::ShardId") - .type_attribute("Shard", "#[derive(Eq)]") .field_attribute( "Shard.follower_id", "#[serde(default, skip_serializing_if = \"Option::is_none\")]", @@ -190,33 +189,38 @@ fn main() -> Result<(), Box> { .file_descriptor_set_path("src/codegen/quickwit/search_descriptor.bin") .protoc_arg("--experimental_allow_proto3_optional"); - tonic_build::configure() + tonic_prost_build::configure() .enum_attribute(".", "#[serde(rename_all=\"snake_case\")]") .type_attribute( ".", "#[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)]", ) - .type_attribute("PartialHit", "#[derive(Eq, Hash)]") .type_attribute("PartialHit.sort_value", "#[derive(Copy)]") - .type_attribute("SearchRequest", "#[derive(Eq, Hash)]") - .type_attribute("ListFieldSerialized", "#[derive(Eq)]") .type_attribute("SortByValue", "#[derive(Ord, PartialOrd)]") - .type_attribute("SortField", "#[derive(Eq, Hash)]") + .type_attribute("SearchRequest", "#[derive(Hash, Eq)]") + .type_attribute("PartialHit", "#[derive(Hash, Eq)]") .out_dir("src/codegen/quickwit") - .compile_protos_with_config(prost_config, &["protos/quickwit/search.proto"], &["protos"])?; + .compile_with_config( + prost_config, + &[std::path::PathBuf::from("protos/quickwit/search.proto")], + &[std::path::PathBuf::from("protos")], + )?; // Jaeger proto let protos = find_protos("protos/third-party/jaeger"); let mut prost_config = prost_build::Config::default(); - prost_config.type_attribute("Operation", "#[derive(Eq, Ord, PartialOrd)]"); + prost_config.type_attribute("Operation", "#[derive(Ord, PartialOrd)]"); - tonic_build::configure() + tonic_prost_build::configure() .out_dir("src/codegen/jaeger") - .compile_protos_with_config( + .compile_with_config( prost_config, &protos, - &["protos/third-party/jaeger", "protos/third-party"], + &[ + std::path::PathBuf::from("protos/third-party/jaeger"), + std::path::PathBuf::from("protos/third-party"), + ], )?; // OTEL proto @@ -224,7 +228,7 @@ fn main() -> Result<(), Box> { prost_config.protoc_arg("--experimental_allow_proto3_optional"); let protos = find_protos("protos/third-party/opentelemetry"); - tonic_build::configure() + tonic_prost_build::configure() .type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]") .type_attribute("StatusCode", r#"#[serde(rename_all = "snake_case")]"#) .type_attribute( @@ -232,7 +236,11 @@ fn main() -> Result<(), Box> { r#"#[derive(utoipa::ToSchema)]"#, ) .out_dir("src/codegen/opentelemetry") - .compile_protos_with_config(prost_config, &protos, &["protos/third-party"])?; + .compile_with_config( + prost_config, + &protos, + &[std::path::PathBuf::from("protos/third-party")], + )?; Ok(()) } diff --git a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs index 5afca901e56..62c517f5232 100644 --- a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs +++ b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs @@ -23,7 +23,7 @@ pub struct Log { #[prost(message, repeated, tag = "2")] pub fields: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SpanRef { #[prost(bytes = "vec", tag = "1")] pub trace_id: ::prost::alloc::vec::Vec, @@ -101,7 +101,7 @@ pub struct Batch { #[prost(message, optional, tag = "2")] pub process: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DependencyLink { #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, diff --git a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.storage.v1.rs b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.storage.v1.rs index 70bbd1d3a46..aa3807fbb32 100644 --- a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.storage.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.storage.v1.rs @@ -1,5 +1,5 @@ // This file is @generated by prost-build. -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDependenciesRequest { #[prost(message, optional, tag = "1")] pub start_time: ::core::option::Option<::prost_types::Timestamp>, @@ -17,35 +17,35 @@ pub struct WriteSpanRequest { pub span: ::core::option::Option, } /// empty; extensible in the future -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WriteSpanResponse {} /// empty; extensible in the future -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CloseWriterRequest {} /// empty; extensible in the future -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CloseWriterResponse {} -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetTraceRequest { #[prost(bytes = "vec", tag = "1")] pub trace_id: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetServicesRequest {} -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetServicesResponse { #[prost(string, repeated, tag = "1")] pub services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOperationsRequest { #[prost(string, tag = "1")] pub service: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub span_kind: ::prost::alloc::string::String, } -#[derive(Eq, Ord, PartialOrd)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Ord, PartialOrd)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Operation { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -97,15 +97,15 @@ pub struct FindTraceIDsRequest { #[prost(message, optional, tag = "1")] pub query: ::core::option::Option, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FindTraceIDsResponse { #[prost(bytes = "vec", repeated, tag = "1")] pub trace_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } /// empty; extensible in the future -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CapabilitiesRequest {} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CapabilitiesResponse { #[prost(bool, tag = "1")] pub archive_span_reader: bool, @@ -221,7 +221,7 @@ pub mod span_writer_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan", ); @@ -247,7 +247,7 @@ pub mod span_writer_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanWriterPlugin/Close", ); @@ -258,6 +258,241 @@ pub mod span_writer_plugin_client { } } } +/// Generated server implementations. +pub mod span_writer_plugin_server { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with SpanWriterPluginServer. + #[async_trait] + pub trait SpanWriterPlugin: std::marker::Send + std::marker::Sync + 'static { + /// spanstore/Writer + async fn write_span( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn close( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct SpanWriterPluginServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl SpanWriterPluginServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for SpanWriterPluginServer + where + T: SpanWriterPlugin, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan" => { + #[allow(non_camel_case_types)] + struct WriteSpanSvc(pub Arc); + impl< + T: SpanWriterPlugin, + > tonic::server::UnaryService + for WriteSpanSvc { + type Response = super::WriteSpanResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::write_span(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = WriteSpanSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/jaeger.storage.v1.SpanWriterPlugin/Close" => { + #[allow(non_camel_case_types)] + struct CloseSvc(pub Arc); + impl< + T: SpanWriterPlugin, + > tonic::server::UnaryService + for CloseSvc { + type Response = super::CloseWriterResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::close(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = CloseSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + let mut response = http::Response::new( + tonic::body::Body::default(), + ); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } + } + } + } + impl Clone for SpanWriterPluginServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "jaeger.storage.v1.SpanWriterPlugin"; + impl tonic::server::NamedService for SpanWriterPluginServer { + const NAME: &'static str = SERVICE_NAME; + } +} /// Generated client implementations. pub mod streaming_span_writer_plugin_client { #![allow( @@ -366,7 +601,7 @@ pub mod streaming_span_writer_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.StreamingSpanWriterPlugin/WriteSpanStream", ); @@ -382,8 +617,8 @@ pub mod streaming_span_writer_plugin_client { } } } -/// Generated client implementations. -pub mod span_reader_plugin_client { +/// Generated server implementations. +pub mod streaming_span_writer_plugin_server { #![allow( unused_variables, dead_code, @@ -392,10 +627,199 @@ pub mod span_reader_plugin_client { clippy::let_unit_value, )] use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct SpanReaderPluginClient { - inner: tonic::client::Grpc, + /// Generated trait containing gRPC methods that should be implemented for use with StreamingSpanWriterPluginServer. + #[async_trait] + pub trait StreamingSpanWriterPlugin: std::marker::Send + std::marker::Sync + 'static { + async fn write_span_stream( + &self, + request: tonic::Request>, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct StreamingSpanWriterPluginServer { + inner: Arc, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + impl StreamingSpanWriterPluginServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> + for StreamingSpanWriterPluginServer + where + T: StreamingSpanWriterPlugin, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + match req.uri().path() { + "/jaeger.storage.v1.StreamingSpanWriterPlugin/WriteSpanStream" => { + #[allow(non_camel_case_types)] + struct WriteSpanStreamSvc(pub Arc); + impl< + T: StreamingSpanWriterPlugin, + > tonic::server::ClientStreamingService + for WriteSpanStreamSvc { + type Response = super::WriteSpanResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + tonic::Streaming, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::write_span_stream( + &inner, + request, + ) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = WriteSpanStreamSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.client_streaming(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + let mut response = http::Response::new( + tonic::body::Body::default(), + ); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } + } + } + } + impl Clone for StreamingSpanWriterPluginServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "jaeger.storage.v1.StreamingSpanWriterPlugin"; + impl tonic::server::NamedService for StreamingSpanWriterPluginServer { + const NAME: &'static str = SERVICE_NAME; + } +} +/// Generated client implementations. +pub mod span_reader_plugin_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct SpanReaderPluginClient { + inner: tonic::client::Grpc, } impl SpanReaderPluginClient { /// Attempt to create a new client by connecting to a given endpoint. @@ -489,7 +913,7 @@ pub mod span_reader_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanReaderPlugin/GetTrace", ); @@ -515,7 +939,7 @@ pub mod span_reader_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanReaderPlugin/GetServices", ); @@ -541,7 +965,7 @@ pub mod span_reader_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanReaderPlugin/GetOperations", ); @@ -570,7 +994,7 @@ pub mod span_reader_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanReaderPlugin/FindTraces", ); @@ -596,939 +1020,18 @@ pub mod span_reader_plugin_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/jaeger.storage.v1.SpanReaderPlugin/FindTraceIDs", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("jaeger.storage.v1.SpanReaderPlugin", "FindTraceIDs"), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated client implementations. -pub mod archive_span_writer_plugin_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct ArchiveSpanWriterPluginClient { - inner: tonic::client::Grpc, - } - impl ArchiveSpanWriterPluginClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl ArchiveSpanWriterPluginClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> ArchiveSpanWriterPluginClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - ArchiveSpanWriterPluginClient::new( - InterceptedService::new(inner, interceptor), - ) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// spanstore/Writer - pub async fn write_archive_span( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "jaeger.storage.v1.ArchiveSpanWriterPlugin", - "WriteArchiveSpan", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated client implementations. -pub mod archive_span_reader_plugin_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct ArchiveSpanReaderPluginClient { - inner: tonic::client::Grpc, - } - impl ArchiveSpanReaderPluginClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl ArchiveSpanReaderPluginClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> ArchiveSpanReaderPluginClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - ArchiveSpanReaderPluginClient::new( - InterceptedService::new(inner, interceptor), - ) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// spanstore/Reader - pub async fn get_archive_trace( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response>, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/jaeger.storage.v1.ArchiveSpanReaderPlugin/GetArchiveTrace", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "jaeger.storage.v1.ArchiveSpanReaderPlugin", - "GetArchiveTrace", - ), - ); - self.inner.server_streaming(req, path, codec).await - } - } -} -/// Generated client implementations. -pub mod dependencies_reader_plugin_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct DependenciesReaderPluginClient { - inner: tonic::client::Grpc, - } - impl DependenciesReaderPluginClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl DependenciesReaderPluginClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> DependenciesReaderPluginClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - DependenciesReaderPluginClient::new( - InterceptedService::new(inner, interceptor), - ) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// dependencystore/Reader - pub async fn get_dependencies( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "jaeger.storage.v1.DependenciesReaderPlugin", - "GetDependencies", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated client implementations. -pub mod plugin_capabilities_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct PluginCapabilitiesClient { - inner: tonic::client::Grpc, - } - impl PluginCapabilitiesClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl PluginCapabilitiesClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> PluginCapabilitiesClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - PluginCapabilitiesClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn capabilities( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/jaeger.storage.v1.PluginCapabilities/Capabilities", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "jaeger.storage.v1.PluginCapabilities", - "Capabilities", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod span_writer_plugin_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with SpanWriterPluginServer. - #[async_trait] - pub trait SpanWriterPlugin: std::marker::Send + std::marker::Sync + 'static { - /// spanstore/Writer - async fn write_span( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn close( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct SpanWriterPluginServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl SpanWriterPluginServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for SpanWriterPluginServer - where - T: SpanWriterPlugin, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan" => { - #[allow(non_camel_case_types)] - struct WriteSpanSvc(pub Arc); - impl< - T: SpanWriterPlugin, - > tonic::server::UnaryService - for WriteSpanSvc { - type Response = super::WriteSpanResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::write_span(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = WriteSpanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/jaeger.storage.v1.SpanWriterPlugin/Close" => { - #[allow(non_camel_case_types)] - struct CloseSvc(pub Arc); - impl< - T: SpanWriterPlugin, - > tonic::server::UnaryService - for CloseSvc { - type Response = super::CloseWriterResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::close(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CloseSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - let mut response = http::Response::new( - tonic::body::Body::default(), - ); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }) - } - } - } - } - impl Clone for SpanWriterPluginServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "jaeger.storage.v1.SpanWriterPlugin"; - impl tonic::server::NamedService for SpanWriterPluginServer { - const NAME: &'static str = SERVICE_NAME; - } -} -/// Generated server implementations. -pub mod streaming_span_writer_plugin_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with StreamingSpanWriterPluginServer. - #[async_trait] - pub trait StreamingSpanWriterPlugin: std::marker::Send + std::marker::Sync + 'static { - async fn write_span_stream( - &self, - request: tonic::Request>, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct StreamingSpanWriterPluginServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl StreamingSpanWriterPluginServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> - for StreamingSpanWriterPluginServer - where - T: StreamingSpanWriterPlugin, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/jaeger.storage.v1.StreamingSpanWriterPlugin/WriteSpanStream" => { - #[allow(non_camel_case_types)] - struct WriteSpanStreamSvc(pub Arc); - impl< - T: StreamingSpanWriterPlugin, - > tonic::server::ClientStreamingService - for WriteSpanStreamSvc { - type Response = super::WriteSpanResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - tonic::Streaming, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::write_span_stream( - &inner, - request, - ) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = WriteSpanStreamSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.client_streaming(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - let mut response = http::Response::new( - tonic::body::Body::default(), - ); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }) - } - } - } - } - impl Clone for StreamingSpanWriterPluginServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } + .insert( + GrpcMethod::new("jaeger.storage.v1.SpanReaderPlugin", "FindTraceIDs"), + ); + self.inner.unary(req, path, codec).await } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "jaeger.storage.v1.StreamingSpanWriterPlugin"; - impl tonic::server::NamedService for StreamingSpanWriterPluginServer { - const NAME: &'static str = SERVICE_NAME; - } } /// Generated server implementations. pub mod span_reader_plugin_server { @@ -1693,7 +1196,7 @@ pub mod span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = GetTraceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1738,7 +1241,7 @@ pub mod span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = GetServicesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1784,7 +1287,7 @@ pub mod span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = GetOperationsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1830,7 +1333,7 @@ pub mod span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = FindTracesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1876,7 +1379,7 @@ pub mod span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = FindTraceIDsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1931,6 +1434,131 @@ pub mod span_reader_plugin_server { const NAME: &'static str = SERVICE_NAME; } } +/// Generated client implementations. +pub mod archive_span_writer_plugin_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct ArchiveSpanWriterPluginClient { + inner: tonic::client::Grpc, + } + impl ArchiveSpanWriterPluginClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ArchiveSpanWriterPluginClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ArchiveSpanWriterPluginClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + ArchiveSpanWriterPluginClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// spanstore/Writer + pub async fn write_archive_span( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "jaeger.storage.v1.ArchiveSpanWriterPlugin", + "WriteArchiveSpan", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} /// Generated server implementations. pub mod archive_span_writer_plugin_server { #![allow( @@ -2064,7 +1692,7 @@ pub mod archive_span_writer_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = WriteArchiveSpanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2113,11 +1741,136 @@ pub mod archive_span_writer_plugin_server { } } } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "jaeger.storage.v1.ArchiveSpanWriterPlugin"; - impl tonic::server::NamedService for ArchiveSpanWriterPluginServer { - const NAME: &'static str = SERVICE_NAME; - } + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "jaeger.storage.v1.ArchiveSpanWriterPlugin"; + impl tonic::server::NamedService for ArchiveSpanWriterPluginServer { + const NAME: &'static str = SERVICE_NAME; + } +} +/// Generated client implementations. +pub mod archive_span_reader_plugin_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct ArchiveSpanReaderPluginClient { + inner: tonic::client::Grpc, + } + impl ArchiveSpanReaderPluginClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ArchiveSpanReaderPluginClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ArchiveSpanReaderPluginClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + ArchiveSpanReaderPluginClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// spanstore/Reader + pub async fn get_archive_trace( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/jaeger.storage.v1.ArchiveSpanReaderPlugin/GetArchiveTrace", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "jaeger.storage.v1.ArchiveSpanReaderPlugin", + "GetArchiveTrace", + ), + ); + self.inner.server_streaming(req, path, codec).await + } + } } /// Generated server implementations. pub mod archive_span_reader_plugin_server { @@ -2259,7 +2012,7 @@ pub mod archive_span_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = GetArchiveTraceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2314,6 +2067,131 @@ pub mod archive_span_reader_plugin_server { const NAME: &'static str = SERVICE_NAME; } } +/// Generated client implementations. +pub mod dependencies_reader_plugin_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct DependenciesReaderPluginClient { + inner: tonic::client::Grpc, + } + impl DependenciesReaderPluginClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl DependenciesReaderPluginClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> DependenciesReaderPluginClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + DependenciesReaderPluginClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// dependencystore/Reader + pub async fn get_dependencies( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "jaeger.storage.v1.DependenciesReaderPlugin", + "GetDependencies", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} /// Generated server implementations. pub mod dependencies_reader_plugin_server { #![allow( @@ -2447,7 +2325,7 @@ pub mod dependencies_reader_plugin_server { let inner = self.inner.clone(); let fut = async move { let method = GetDependenciesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2502,6 +2380,128 @@ pub mod dependencies_reader_plugin_server { const NAME: &'static str = SERVICE_NAME; } } +/// Generated client implementations. +pub mod plugin_capabilities_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct PluginCapabilitiesClient { + inner: tonic::client::Grpc, + } + impl PluginCapabilitiesClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl PluginCapabilitiesClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> PluginCapabilitiesClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + PluginCapabilitiesClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn capabilities( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/jaeger.storage.v1.PluginCapabilities/Capabilities", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "jaeger.storage.v1.PluginCapabilities", + "Capabilities", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} /// Generated server implementations. pub mod plugin_capabilities_server { #![allow( @@ -2630,7 +2630,7 @@ pub mod plugin_capabilities_server { let inner = self.inner.clone(); let fut = async move { let method = CapabilitiesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.logs.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.logs.v1.rs index 4716de6fbf9..6160453b8ea 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.logs.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.logs.v1.rs @@ -14,7 +14,7 @@ pub struct ExportLogsServiceRequest { } #[derive(serde::Serialize, serde::Deserialize)] #[derive(utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportLogsServiceResponse { /// The details of a partially successful export request. /// @@ -28,14 +28,13 @@ pub struct ExportLogsServiceResponse { /// In such cases, the `rejected_` MUST have a value of `0` and /// the `error_message` MUST be non-empty. /// - /// A `partial_success` message with an empty value (`rejected_1 = 0 and - /// `error_message` = "") is equivalent to it not being set/present. Senders + /// A `partial_success` message with an empty value (`rejected_1 = 0 and `error_message\` = "") is equivalent to it not being set/present. Senders /// SHOULD interpret it the same way as in the full success case. #[prost(message, optional, tag = "1")] pub partial_success: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportLogsPartialSuccess { /// The number of rejected log records. /// @@ -164,7 +163,7 @@ pub mod logs_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.logs.v1.LogsService/Export", ); @@ -312,7 +311,7 @@ pub mod logs_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.metrics.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.metrics.v1.rs index 6b899c43ba6..fab8cd4de8f 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.metrics.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.metrics.v1.rs @@ -13,7 +13,7 @@ pub struct ExportMetricsServiceRequest { >, } #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportMetricsServiceResponse { /// The details of a partially successful export request. /// @@ -27,14 +27,14 @@ pub struct ExportMetricsServiceResponse { /// In such cases, the `rejected_` MUST have a value of `0` and /// the `error_message` MUST be non-empty. /// - /// A `partial_success` message with an empty value (rejected_ = 0 and + /// A `partial_success` message with an empty value (rejected\_ = 0 and /// `error_message` = "") is equivalent to it not being set/present. Senders /// SHOULD interpret it the same way as in the full success case. #[prost(message, optional, tag = "1")] pub partial_success: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportMetricsPartialSuccess { /// The number of rejected data points. /// @@ -163,7 +163,7 @@ pub mod metrics_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", ); @@ -311,7 +311,7 @@ pub mod metrics_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.trace.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.trace.v1.rs index dfadd5f6e79..2ba3e83cb9e 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.trace.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.collector.trace.v1.rs @@ -13,7 +13,7 @@ pub struct ExportTraceServiceRequest { >, } #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportTraceServiceResponse { /// The details of a partially successful export request. /// @@ -27,14 +27,14 @@ pub struct ExportTraceServiceResponse { /// In such cases, the `rejected_` MUST have a value of `0` and /// the `error_message` MUST be non-empty. /// - /// A `partial_success` message with an empty value (rejected_ = 0 and + /// A `partial_success` message with an empty value (rejected\_ = 0 and /// `error_message` = "") is equivalent to it not being set/present. Senders /// SHOULD interpret it the same way as in the full success case. #[prost(message, optional, tag = "1")] pub partial_success: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExportTracePartialSuccess { /// The number of rejected spans. /// @@ -163,7 +163,7 @@ pub mod trace_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/opentelemetry.proto.collector.trace.v1.TraceService/Export", ); @@ -311,7 +311,7 @@ pub mod trace_service_server { let inner = self.inner.clone(); let fut = async move { let method = ExportSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.logs.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.logs.v1.rs index 0ffab8a5334..2a4af4d5139 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.logs.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.logs.v1.rs @@ -73,7 +73,8 @@ pub struct LogRecord { /// For converting OpenTelemetry log data to formats that support only one timestamp or /// when receiving OpenTelemetry log data by recipients that support only one timestamp /// internally the following logic is recommended: - /// - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. + /// + /// * Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. /// /// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. /// Value of 0 indicates unknown or missing timestamp. diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.metrics.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.metrics.v1.rs index 10dee3a6b8a..cf4cdece793 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.metrics.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.metrics.v1.rs @@ -55,66 +55,69 @@ pub struct ScopeMetrics { /// Defines a Metric which has one or more timeseries. The following is a /// brief summary of the Metric data model. For more details, see: /// -/// -/// +/// /// /// The data model and relation between entities is shown in the /// diagram below. Here, "DataPoint" is the term used to refer to any /// one of the specific data point value types, and "points" is the term used /// to refer to any one of the lists of points contained in the Metric. /// -/// - Metric is composed of a metadata and data. -/// - Metadata part contains a name, description, unit. -/// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). -/// - DataPoint contains timestamps, attributes, and one of the possible value type -/// fields. +/// * Metric is composed of a metadata and data. +/// +/// * Metadata part contains a name, description, unit. +/// +/// * Data is one of the possible types (Sum, Gauge, Histogram, Summary). +/// +/// * DataPoint contains timestamps, attributes, and one of the possible value type +/// fields. /// -/// Metric +/// Metric /// +------------+ -/// |name | -/// |description | -/// |unit | +------------------------------------+ -/// |data |---> |Gauge, Sum, Histogram, Summary, ... | +/// \|name | +/// \|description | +/// \|unit | +------------------------------------+ +/// \|data |---> |Gauge, Sum, Histogram, Summary, ... | /// +------------+ +------------------------------------+ /// -/// Data \[One of Gauge, Sum, Histogram, Summary, ...\] +/// Data \[One of Gauge, Sum, Histogram, Summary, ...\] /// +-----------+ -/// |... | // Metadata about the Data. -/// |points |--+ +/// \|... | // Metadata about the Data. +/// \|points |--+ /// +-----------+ | -/// | +---------------------------+ -/// | |DataPoint 1 | -/// v |+------+------+ +------+ | -/// +-----+ ||label |label |...|label | | -/// | 1 |-->||value1|value2|...|valueN| | -/// +-----+ |+------+------+ +------+ | -/// | . | |+-----+ | -/// | . | ||value| | -/// | . | |+-----+ | -/// | . | +---------------------------+ -/// | . | . -/// | . | . -/// | . | . -/// | . | +---------------------------+ -/// | . | |DataPoint M | -/// +-----+ |+------+------+ +------+ | -/// | M |-->||label |label |...|label | | -/// +-----+ ||value1|value2|...|valueN| | -/// |+------+------+ +------+ | -/// |+-----+ | -/// ||value| | -/// |+-----+ | -/// +---------------------------+ +/// \| +---------------------------+ +/// \| |DataPoint 1 | +/// v |+------+------+ +------+ | +/// +-----+ ||label |label |...|label | | +/// \| 1 |-->||value1|value2|...|valueN| | +/// +-----+ |+------+------+ +------+ | +/// \| . | |+-----+ | +/// \| . | ||value| | +/// \| . | |+-----+ | +/// \| . | +---------------------------+ +/// \| . | . +/// \| . | . +/// \| . | . +/// \| . | +---------------------------+ +/// \| . | |DataPoint M | +/// +-----+ |+------+------+ +------+ | +/// \| M |-->||label |label |...|label | | +/// +-----+ ||value1|value2|...|valueN| | +/// \|+------+------+ +------+ | +/// \|+-----+ | +/// \||value| | +/// \|+-----+ | +/// +---------------------------+ /// /// Each distinct type of DataPoint represents the output of a specific /// aggregation function, the result of applying the DataPoint's /// associated function of to one or more measurements. /// /// All DataPoint types have three common fields: -/// - Attributes includes key-value pairs associated with the data point -/// - TimeUnixNano is required, set to the end time of the aggregation -/// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints -/// having an AggregationTemporality field, as discussed below. +/// +/// * Attributes includes key-value pairs associated with the data point +/// * TimeUnixNano is required, set to the end time of the aggregation +/// * StartTimeUnixNano is optional, but strongly encouraged for DataPoints +/// having an AggregationTemporality field, as discussed below. /// /// Both TimeUnixNano and StartTimeUnixNano values are expressed as /// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. @@ -352,8 +355,8 @@ pub struct HistogramDataPoint { /// /// The boundaries for bucket at index i are: /// - /// (-infinity, explicit_bounds\[i]\] for i == 0 - /// (explicit_bounds\[i-1\], explicit_bounds\[i]\] for 0 < i < size(explicit_bounds) + /// (-infinity, explicit_bounds\[i\]\] for i == 0 + /// (explicit_bounds\[i-1\], explicit_bounds\[i\]\] for 0 \< i \< size(explicit_bounds) /// (explicit_bounds\[i-1\], +infinity) for i == size(explicit_bounds) /// /// The values in the explicit_bounds array must be strictly increasing. @@ -371,10 +374,10 @@ pub struct HistogramDataPoint { /// for the available flags and their meaning. #[prost(uint32, tag = "10")] pub flags: u32, - /// min is the minimum value over (start_time, end_time]. + /// min is the minimum value over (start_time, end_time\]. #[prost(double, optional, tag = "11")] pub min: ::core::option::Option, - /// max is the maximum value over (start_time, end_time]. + /// max is the maximum value over (start_time, end_time\]. #[prost(double, optional, tag = "12")] pub max: ::core::option::Option, } @@ -382,7 +385,6 @@ pub struct HistogramDataPoint { /// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains /// summary statistics for a population of values, it may optionally contain the /// distribution of those values across a set of buckets. -/// #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExponentialHistogramDataPoint { @@ -423,7 +425,7 @@ pub struct ExponentialHistogramDataPoint { /// scale describes the resolution of the histogram. Boundaries are /// located at powers of the base, where: /// - /// base = (2^(2^-scale)) + /// base = (2^(2^-scale)) /// /// The histogram bucket identified by `index`, a signed integer, /// contains values that are greater than (base^index) and @@ -461,10 +463,10 @@ pub struct ExponentialHistogramDataPoint { /// measurements that were used to form the data point #[prost(message, repeated, tag = "11")] pub exemplars: ::prost::alloc::vec::Vec, - /// min is the minimum value over (start_time, end_time]. + /// min is the minimum value over (start_time, end_time\]. #[prost(double, optional, tag = "12")] pub min: ::core::option::Option, - /// max is the maximum value over (start_time, end_time]. + /// max is the maximum value over (start_time, end_time\]. #[prost(double, optional, tag = "13")] pub max: ::core::option::Option, } @@ -473,7 +475,7 @@ pub mod exponential_histogram_data_point { /// Buckets are a set of bucket counts, encoded in a contiguous array /// of counts. #[derive(serde::Serialize, serde::Deserialize)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Buckets { /// Offset is the bucket index of the first entry in the bucket_counts array. /// @@ -544,8 +546,9 @@ pub mod summary_data_point { /// Represents the value at a given quantile of a distribution. /// /// To record Min and Max values following conventions are used: - /// - The 1.0 quantile is equivalent to the maximum value observed. - /// - The 0.0 quantile is equivalent to the minimum value observed. + /// + /// * The 1.0 quantile is equivalent to the maximum value observed. + /// * The 0.0 quantile is equivalent to the minimum value observed. /// /// See the following issue for more context: /// @@ -634,18 +637,18 @@ pub enum AggregationTemporality { /// it receives and reports the sum of these requests every second as a /// DELTA metric: /// - /// 1. The system starts receiving at time=t_0. - /// 2. A request is received, the system measures 1 request. - /// 3. A request is received, the system measures 1 request. - /// 4. A request is received, the system measures 1 request. - /// 5. The 1 second collection cycle ends. A metric is exported for the - /// number of requests received over the interval of time t_0 to - /// t_0+1 with a value of 3. - /// 6. A request is received, the system measures 1 request. - /// 7. A request is received, the system measures 1 request. - /// 8. The 1 second collection cycle ends. A metric is exported for the - /// number of requests received over the interval of time t_0+1 to - /// t_0+2 with a value of 2. + /// 1. The system starts receiving at time=t_0. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. The 1 second collection cycle ends. A metric is exported for the + /// number of requests received over the interval of time t_0 to + /// t_0+1 with a value of 3. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. The 1 second collection cycle ends. A metric is exported for the + /// number of requests received over the interval of time t_0+1 to + /// t_0+2 with a value of 2. Delta = 1, /// CUMULATIVE is an AggregationTemporality for a metric aggregator which /// reports changes since a fixed start time. This means that current values @@ -659,24 +662,24 @@ pub enum AggregationTemporality { /// it receives and reports the sum of these requests every second as a /// CUMULATIVE metric: /// - /// 1. The system starts receiving at time=t_0. - /// 2. A request is received, the system measures 1 request. - /// 3. A request is received, the system measures 1 request. - /// 4. A request is received, the system measures 1 request. - /// 5. The 1 second collection cycle ends. A metric is exported for the - /// number of requests received over the interval of time t_0 to - /// t_0+1 with a value of 3. - /// 6. A request is received, the system measures 1 request. - /// 7. A request is received, the system measures 1 request. - /// 8. The 1 second collection cycle ends. A metric is exported for the - /// number of requests received over the interval of time t_0 to - /// t_0+2 with a value of 5. - /// 9. The system experiences a fault and loses state. - /// 10. The system recovers and resumes receiving at time=t_1. - /// 11. A request is received, the system measures 1 request. - /// 12. The 1 second collection cycle ends. A metric is exported for the - /// number of requests received over the interval of time t_1 to - /// t_0+1 with a value of 1. + /// 1. The system starts receiving at time=t_0. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. The 1 second collection cycle ends. A metric is exported for the + /// number of requests received over the interval of time t_0 to + /// t_0+1 with a value of 3. + /// 1. A request is received, the system measures 1 request. + /// 1. A request is received, the system measures 1 request. + /// 1. The 1 second collection cycle ends. A metric is exported for the + /// number of requests received over the interval of time t_0 to + /// t_0+2 with a value of 5. + /// 1. The system experiences a fault and loses state. + /// 1. The system recovers and resumes receiving at time=t_1. + /// 1. A request is received, the system measures 1 request. + /// 1. The 1 second collection cycle ends. A metric is exported for the + /// number of requests received over the interval of time t_1 to + /// t_0+1 with a value of 1. /// /// Note: Even though, when reporting changes since last report time, using /// CUMULATIVE is valid, it is not recommended. This may cause problems for @@ -711,8 +714,7 @@ impl AggregationTemporality { /// enum is a bit-mask. To test the presence of a single flag in the flags of /// a data point, for example, use an expression like: /// -/// (point.flags & FLAG_NO_RECORDED_VALUE) == FLAG_NO_RECORDED_VALUE -/// +/// (point.flags & FLAG_NO_RECORDED_VALUE) == FLAG_NO_RECORDED_VALUE #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.trace.v1.rs b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.trace.v1.rs index e9b1c46e185..7159014a96c 100644 --- a/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.trace.v1.rs +++ b/quickwit/quickwit-proto/src/codegen/opentelemetry/opentelemetry.proto.trace.v1.rs @@ -124,10 +124,12 @@ pub struct Span { /// attributes is a collection of key/value pairs. Note, global attributes /// like server name can be set using the resource API. Examples of attributes: /// - /// "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - /// "/http/server_latency": 300 - /// "abc.com/myattribute": true - /// "abc.com/score": 10.239 + /// ```text + /// "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + /// "/http/server_latency": 300 + /// "abc.com/myattribute": true + /// "abc.com/score": 10.239 + /// ``` /// /// The OpenTelemetry API specification further restricts the allowed value types: /// @@ -284,7 +286,7 @@ pub mod span { /// The Status type defines a logical error model that is suitable for different /// programming environments, including REST APIs and RPC APIs. #[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Status { /// A developer-facing human readable error message. #[prost(string, tag = "2")] diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.cluster.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.cluster.rs index 8c8549d7730..f326b8e7c29 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.cluster.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.cluster.rs @@ -1,6 +1,6 @@ // This file is @generated by prost-build. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ChitchatId { #[prost(string, tag = "1")] pub node_id: ::prost::alloc::string::String, @@ -10,7 +10,7 @@ pub struct ChitchatId { pub gossip_advertise_addr: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct VersionedKeyValue { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, @@ -34,7 +34,7 @@ pub struct NodeState { pub last_gc_version: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchClusterStateRequest { #[prost(string, tag = "1")] pub cluster_id: ::prost::alloc::string::String, @@ -678,7 +678,7 @@ pub mod cluster_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.cluster.ClusterService/FetchClusterState", ); @@ -825,7 +825,7 @@ pub mod cluster_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = FetchClusterStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.common.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.common.rs index b757cebb6d0..82aeb311280 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.common.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.common.rs @@ -4,7 +4,7 @@ /// /// Modify at your own risk. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DocUid { /// ULID encoded as a sequence of 16 bytes (big-endian u128). #[prost(bytes = "vec", tag = "1")] diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.control_plane.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.control_plane.rs index ee9229c10cc..09cfbdebf58 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.control_plane.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.control_plane.rs @@ -15,7 +15,7 @@ pub struct GetOrCreateOpenShardsRequest { pub unavailable_leaders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOrCreateOpenShardsSubrequest { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -45,7 +45,7 @@ pub struct GetOrCreateOpenShardsSuccess { pub open_shards: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOrCreateOpenShardsFailure { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -127,55 +127,55 @@ use tower::{Layer, Service, ServiceExt}; #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait ControlPlaneService: std::fmt::Debug + Send + Sync + 'static { - /// Creates a new index. + ///Creates a new index. async fn create_index( &self, request: super::metastore::CreateIndexRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Updates an index. + ///Updates an index. async fn update_index( &self, request: super::metastore::UpdateIndexRequest, ) -> crate::control_plane::ControlPlaneResult< super::metastore::IndexMetadataResponse, >; - /// Deletes an index. + ///Deletes an index. async fn delete_index( &self, request: super::metastore::DeleteIndexRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Adds a source to an index. + ///Adds a source to an index. async fn add_source( &self, request: super::metastore::AddSourceRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Update a source. + ///Update a source. async fn update_source( &self, request: super::metastore::UpdateSourceRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Enables or disables a source. + ///Enables or disables a source. async fn toggle_source( &self, request: super::metastore::ToggleSourceRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Removes a source from an index. + ///Removes a source from an index. async fn delete_source( &self, request: super::metastore::DeleteSourceRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Returns the list of open shards for one or several sources. If the control plane is not able to find any - /// for a source, it will pick a pair of leader-follower ingesters and will open a new shard. + ///Returns the list of open shards for one or several sources. If the control plane is not able to find any + ///for a source, it will pick a pair of leader-follower ingesters and will open a new shard. async fn get_or_create_open_shards( &self, request: GetOrCreateOpenShardsRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Asks the control plane whether the shards listed in the request should be deleted or truncated. + ///Asks the control plane whether the shards listed in the request should be deleted or truncated. async fn advise_reset_shards( &self, request: AdviseResetShardsRequest, ) -> crate::control_plane::ControlPlaneResult; - /// Performs a debounced shard pruning request to the metastore. + ///Performs a debounced shard pruning request to the metastore. async fn prune_shards( &self, request: super::metastore::PruneShardsRequest, @@ -2159,7 +2159,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/CreateIndex", ); @@ -2189,7 +2189,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/UpdateIndex", ); @@ -2219,7 +2219,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/DeleteIndex", ); @@ -2249,7 +2249,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/AddSource", ); @@ -2281,7 +2281,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/UpdateSource", ); @@ -2313,7 +2313,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/ToggleSource", ); @@ -2345,7 +2345,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/DeleteSource", ); @@ -2376,7 +2376,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/GetOrCreateOpenShards", ); @@ -2406,7 +2406,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/AdviseResetShards", ); @@ -2436,7 +2436,7 @@ pub mod control_plane_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.control_plane.ControlPlaneService/PruneShards", ); @@ -2661,7 +2661,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = CreateIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2713,7 +2713,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = UpdateIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2765,7 +2765,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2814,7 +2814,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = AddSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2866,7 +2866,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = UpdateSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2918,7 +2918,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ToggleSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2970,7 +2970,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3021,7 +3021,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = GetOrCreateOpenShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3070,7 +3070,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = AdviseResetShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3122,7 +3122,7 @@ pub mod control_plane_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = PruneShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.developer.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.developer.rs index 4956b0c2aae..38520a259ec 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.developer.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.developer.rs @@ -1,13 +1,13 @@ // This file is @generated by prost-build. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDebugInfoRequest { /// Restricts the debug info to the given roles. #[prost(string, repeated, tag = "1")] pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDebugInfoResponse { #[prost(bytes = "bytes", tag = "1")] pub debug_info_json: ::prost::bytes::Bytes, @@ -611,7 +611,7 @@ pub mod developer_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.developer.DeveloperService/GetDebugInfo", ); @@ -756,7 +756,7 @@ pub mod developer_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = GetDebugInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.indexing.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.indexing.rs index ede0c73c9bd..c22235f36ec 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.indexing.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.indexing.rs @@ -26,7 +26,7 @@ pub struct IndexingTask { pub params_fingerprint: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ApplyIndexingPlanResponse {} /// BEGIN quickwit-codegen #[allow(unused_imports)] @@ -35,7 +35,7 @@ use tower::{Layer, Service, ServiceExt}; #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait IndexingService: std::fmt::Debug + Send + Sync + 'static { - /// Apply an indexing plan on the node. + ///Apply an indexing plan on the node. async fn apply_indexing_plan( &self, request: ApplyIndexingPlanRequest, @@ -624,7 +624,7 @@ pub mod indexing_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.indexing.IndexingService/ApplyIndexingPlan", ); @@ -772,7 +772,7 @@ pub mod indexing_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ApplyIndexingPlanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.ingester.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.ingester.rs index 353abb15301..018e19a39a9 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.ingester.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.ingester.rs @@ -16,7 +16,7 @@ pub struct RetainShardsRequest { pub retain_shards_for_sources: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RetainShardsResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -71,7 +71,7 @@ pub struct PersistSuccess { pub parse_failures: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PersistFailure { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -125,7 +125,7 @@ pub mod ack_replication_message { } } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenReplicationStreamRequest { #[prost(string, tag = "1")] pub leader_id: ::prost::alloc::string::String, @@ -136,14 +136,14 @@ pub struct OpenReplicationStreamRequest { pub replication_seqno: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenReplicationStreamResponse { /// Position of the response in the replication stream. It should match the position of the request. #[prost(uint64, tag = "1")] pub replication_seqno: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InitReplicaRequest { #[prost(message, optional, tag = "1")] pub replica_shard: ::core::option::Option, @@ -151,7 +151,7 @@ pub struct InitReplicaRequest { pub replication_seqno: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct InitReplicaResponse { #[prost(uint64, tag = "1")] pub replication_seqno: u64, @@ -201,7 +201,7 @@ pub struct ReplicateResponse { pub replication_seqno: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReplicateSuccess { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -215,7 +215,7 @@ pub struct ReplicateSuccess { pub replication_position_inclusive: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReplicateFailure { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -237,7 +237,7 @@ pub struct TruncateShardsRequest { pub subrequests: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TruncateShardsSubrequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -253,10 +253,10 @@ pub struct TruncateShardsSubrequest { } /// TODO #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TruncateShardsResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenFetchStreamRequest { #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, @@ -270,7 +270,7 @@ pub struct OpenFetchStreamRequest { pub from_position_exclusive: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchMessage { #[prost(oneof = "fetch_message::Message", tags = "1, 2")] pub message: ::core::option::Option, @@ -279,7 +279,7 @@ pub struct FetchMessage { pub mod fetch_message { #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] #[serde(rename_all = "snake_case")] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Message { #[prost(message, tag = "1")] Payload(super::FetchPayload), @@ -288,7 +288,7 @@ pub mod fetch_message { } } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchPayload { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -304,7 +304,7 @@ pub struct FetchPayload { pub to_position_inclusive: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchEof { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -322,7 +322,7 @@ pub struct InitShardsRequest { pub subrequests: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InitShardSubrequest { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -342,7 +342,7 @@ pub struct InitShardsResponse { pub failures: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InitShardSuccess { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -350,7 +350,7 @@ pub struct InitShardSuccess { pub shard: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InitShardFailure { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -375,16 +375,16 @@ pub struct CloseShardsResponse { pub successes: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DecommissionRequest {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DecommissionResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenObservationStreamRequest {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ObservationMessage { #[prost(string, tag = "1")] pub node_id: ::prost::alloc::string::String, @@ -569,49 +569,49 @@ pub type IngesterServiceStream = quickwit_common::ServiceStream< #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait IngesterService: std::fmt::Debug + Send + Sync + 'static { - /// Persists batches of documents to primary shards hosted on a leader. + ///Persists batches of documents to primary shards hosted on a leader. async fn persist( &self, request: PersistRequest, ) -> crate::ingest::IngestV2Result; - /// Opens a replication stream from a leader to a follower. + ///Opens a replication stream from a leader to a follower. async fn open_replication_stream( &self, request: quickwit_common::ServiceStream, ) -> crate::ingest::IngestV2Result>; - /// Streams records from a leader or a follower. The client can optionally specify a range of positions to fetch, - /// otherwise the stream will go indefinitely or until the shard is closed. + ///Streams records from a leader or a follower. The client can optionally specify a range of positions to fetch, + ///otherwise the stream will go indefinitely or until the shard is closed. async fn open_fetch_stream( &self, request: OpenFetchStreamRequest, ) -> crate::ingest::IngestV2Result>; - /// Streams status updates, called "observations", from an ingester. + ///Streams status updates, called "observations", from an ingester. async fn open_observation_stream( &self, request: OpenObservationStreamRequest, ) -> crate::ingest::IngestV2Result>; - /// Creates and initializes a set of newly opened shards. This RPC is called by the control plane on leaders. + ///Creates and initializes a set of newly opened shards. This RPC is called by the control plane on leaders. async fn init_shards( &self, request: InitShardsRequest, ) -> crate::ingest::IngestV2Result; - /// Only retain the shards that are listed in the request. - /// Other shards are deleted. + ///Only retain the shards that are listed in the request. + ///Other shards are deleted. async fn retain_shards( &self, request: RetainShardsRequest, ) -> crate::ingest::IngestV2Result; - /// Truncates a set of shards at the given positions. This RPC is called by indexers on leaders AND followers. + ///Truncates a set of shards at the given positions. This RPC is called by indexers on leaders AND followers. async fn truncate_shards( &self, request: TruncateShardsRequest, ) -> crate::ingest::IngestV2Result; - /// Closes a set of shards. This RPC is called by the control plane. + ///Closes a set of shards. This RPC is called by the control plane. async fn close_shards( &self, request: CloseShardsRequest, ) -> crate::ingest::IngestV2Result; - /// Decommissions the ingester. + ///Decommissions the ingester. async fn decommission( &self, request: DecommissionRequest, @@ -2403,7 +2403,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/Persist", ); @@ -2435,7 +2435,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/OpenReplicationStream", ); @@ -2466,7 +2466,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/OpenFetchStream", ); @@ -2496,7 +2496,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/OpenObservationStream", ); @@ -2526,7 +2526,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/InitShards", ); @@ -2557,7 +2557,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/RetainShards", ); @@ -2587,7 +2587,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/TruncateShards", ); @@ -2617,7 +2617,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/CloseShards", ); @@ -2647,7 +2647,7 @@ pub mod ingester_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.ingester.IngesterService/Decommission", ); @@ -2872,7 +2872,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = PersistSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2924,7 +2924,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = OpenReplicationStreamSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -2975,7 +2975,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = OpenFetchStreamSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3026,7 +3026,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = OpenObservationStreamSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3072,7 +3072,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = InitShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3118,7 +3118,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = RetainShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3164,7 +3164,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = TruncateShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3210,7 +3210,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = CloseShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -3256,7 +3256,7 @@ pub mod ingester_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DecommissionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.router.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.router.rs index b540175fcec..f502783e038 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.router.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.router.rs @@ -51,7 +51,7 @@ pub struct IngestSuccess { pub parse_failures: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IngestFailure { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -132,8 +132,8 @@ impl RpcName for IngestRequestV2 { #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait IngestRouterService: std::fmt::Debug + Send + Sync + 'static { - /// Ingests batches of documents for one or multiple indexes. - /// TODO: Describe error cases and how to handle them. + ///Ingests batches of documents for one or multiple indexes. + ///TODO: Describe error cases and how to handle them. async fn ingest( &self, request: IngestRequestV2, @@ -726,7 +726,7 @@ pub mod ingest_router_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.ingest.router.IngestRouterService/Ingest", ); @@ -873,7 +873,7 @@ pub mod ingest_router_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = IngestSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.rs index e127f1320f9..dd4cff961ad 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.ingest.rs @@ -1,7 +1,7 @@ // This file is @generated by prost-build. /// Shard primary key. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ShardPKey { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -21,7 +21,7 @@ pub struct DocBatchV2 { pub doc_uids: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MRecordBatch { /// Buffer of encoded and then concatenated mrecords. #[prost(bytes = "bytes", tag = "1")] @@ -30,9 +30,8 @@ pub struct MRecordBatch { #[prost(uint32, repeated, tag = "2")] pub mrecord_lengths: ::prost::alloc::vec::Vec, } -#[derive(Eq)] #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Shard { /// Immutable fields #[prost(message, optional, tag = "1")] @@ -91,7 +90,7 @@ pub struct ShardIdPositions { pub shard_positions: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ShardIdPosition { #[prost(message, optional, tag = "1")] pub shard_id: ::core::option::Option, @@ -99,7 +98,7 @@ pub struct ShardIdPosition { pub publish_position_inclusive: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ParseFailure { #[prost(message, optional, tag = "1")] pub doc_uid: ::core::option::Option, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.metastore.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.metastore.rs index 67f3b9410e2..1ba6096d031 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.metastore.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.metastore.rs @@ -1,9 +1,9 @@ // This file is @generated by prost-build. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct EmptyResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateIndexRequest { #[prost(string, tag = "2")] pub index_config_json: ::prost::alloc::string::String, @@ -11,7 +11,7 @@ pub struct CreateIndexRequest { pub source_configs_json: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateIndexResponse { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -19,7 +19,7 @@ pub struct CreateIndexResponse { pub index_metadata_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateIndexRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -37,7 +37,7 @@ pub struct UpdateIndexRequest { >, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListIndexesMetadataRequest { /// List of patterns an index should match or not match to get considered /// An index must match at least one positive pattern (a pattern not starting @@ -46,7 +46,7 @@ pub struct ListIndexesMetadataRequest { pub index_id_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListIndexesMetadataResponse { /// Deprecated (v0.9.0), use `indexes_metadata_json_zstd` instead. #[prost(string, optional, tag = "1")] @@ -59,7 +59,7 @@ pub struct ListIndexesMetadataResponse { pub indexes_metadata_json_zstd: ::prost::bytes::Bytes, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteIndexRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -69,7 +69,7 @@ pub struct DeleteIndexRequest { /// /// If both are supplied, `index_uid` is used. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IndexMetadataRequest { #[prost(string, optional, tag = "1")] pub index_id: ::core::option::Option<::prost::alloc::string::String>, @@ -77,7 +77,7 @@ pub struct IndexMetadataRequest { pub index_uid: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IndexMetadataResponse { #[prost(string, tag = "1")] pub index_metadata_serialized_json: ::prost::alloc::string::String, @@ -89,7 +89,7 @@ pub struct IndexesMetadataRequest { pub subrequests: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IndexMetadataSubrequest { #[prost(string, optional, tag = "1")] pub index_id: ::core::option::Option<::prost::alloc::string::String>, @@ -107,7 +107,7 @@ pub struct IndexesMetadataResponse { pub failures: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IndexMetadataFailure { #[prost(string, optional, tag = "1")] pub index_id: ::core::option::Option<::prost::alloc::string::String>, @@ -117,7 +117,7 @@ pub struct IndexMetadataFailure { pub reason: i32, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListSplitsRequest { /// Predicate used to filter splits. /// The predicate is expressed as a JSON serialized @@ -126,14 +126,14 @@ pub struct ListSplitsRequest { pub query_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListSplitsResponse { /// TODO use repeated and encode splits json individually. #[prost(string, tag = "1")] pub splits_serialized_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StageSplitsRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -141,7 +141,7 @@ pub struct StageSplitsRequest { pub split_metadata_list_serialized_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PublishSplitsRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -157,7 +157,7 @@ pub struct PublishSplitsRequest { pub publish_token_opt: ::core::option::Option<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MarkSplitsForDeletionRequest { #[prost(message, optional, tag = "2")] pub index_uid: ::core::option::Option, @@ -165,7 +165,7 @@ pub struct MarkSplitsForDeletionRequest { pub split_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteSplitsRequest { #[prost(message, optional, tag = "2")] pub index_uid: ::core::option::Option, @@ -173,7 +173,7 @@ pub struct DeleteSplitsRequest { pub split_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AddSourceRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -181,7 +181,7 @@ pub struct AddSourceRequest { pub source_config_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateSourceRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -189,7 +189,7 @@ pub struct UpdateSourceRequest { pub source_config_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ToggleSourceRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -199,7 +199,7 @@ pub struct ToggleSourceRequest { pub enable: bool, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteSourceRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -207,7 +207,7 @@ pub struct DeleteSourceRequest { pub source_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResetSourceCheckpointRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -215,7 +215,7 @@ pub struct ResetSourceCheckpointRequest { pub source_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteTask { #[prost(int64, tag = "1")] pub create_timestamp: i64, @@ -225,7 +225,7 @@ pub struct DeleteTask { pub delete_query: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteQuery { /// Index UID. #[prost(message, optional, tag = "1")] @@ -236,7 +236,7 @@ pub struct DeleteQuery { #[prost(int64, optional, tag = "2")] #[serde(skip_serializing_if = "Option::is_none")] pub start_timestamp: ::core::option::Option, - /// If set, restrict search to documents with a `timestamp < end_timestamp``. + /// If set, restrict search to documents with a \`timestamp \< end_timestamp\``. #[prost(int64, optional, tag = "3")] #[serde(skip_serializing_if = "Option::is_none")] pub end_timestamp: ::core::option::Option, @@ -246,7 +246,7 @@ pub struct DeleteQuery { pub query_ast: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateSplitsDeleteOpstampRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -256,22 +256,22 @@ pub struct UpdateSplitsDeleteOpstampRequest { pub delete_opstamp: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateSplitsDeleteOpstampResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LastDeleteOpstampRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct LastDeleteOpstampResponse { #[prost(uint64, tag = "1")] pub last_delete_opstamp: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListStaleSplitsRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -281,7 +281,7 @@ pub struct ListStaleSplitsRequest { pub num_splits: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListDeleteTasksRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -301,7 +301,7 @@ pub struct OpenShardsRequest { pub subrequests: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenShardSubrequest { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -327,7 +327,7 @@ pub struct OpenShardsResponse { pub subresponses: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenShardSubresponse { #[prost(uint32, tag = "1")] pub subrequest_id: u32, @@ -382,7 +382,7 @@ pub struct DeleteShardsResponse { pub failures: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PruneShardsRequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -405,7 +405,7 @@ pub struct ListShardsRequest { pub subrequests: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListShardsSubrequest { #[prost(message, optional, tag = "1")] pub index_uid: ::core::option::Option, @@ -431,7 +431,7 @@ pub struct ListShardsSubresponse { pub shards: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateIndexTemplateRequest { #[prost(string, tag = "1")] pub index_template_json: ::prost::alloc::string::String, @@ -439,19 +439,19 @@ pub struct CreateIndexTemplateRequest { pub overwrite: bool, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetIndexTemplateRequest { #[prost(string, tag = "1")] pub template_id: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetIndexTemplateResponse { #[prost(string, tag = "1")] pub index_template_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FindIndexTemplateMatchesRequest { #[prost(string, repeated, tag = "1")] pub index_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -463,7 +463,7 @@ pub struct FindIndexTemplateMatchesResponse { pub matches: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IndexTemplateMatch { #[prost(string, tag = "1")] pub index_id: ::prost::alloc::string::String, @@ -473,25 +473,25 @@ pub struct IndexTemplateMatch { pub index_template_json: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListIndexTemplatesRequest {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListIndexTemplatesResponse { #[prost(string, repeated, tag = "1")] pub index_templates_json: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteIndexTemplatesRequest { #[prost(string, repeated, tag = "1")] pub template_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterIdentityRequest {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterIdentityResponse { #[prost(string, tag = "1")] pub uuid: ::prost::alloc::string::String, @@ -763,144 +763,144 @@ pub type MetastoreServiceStream = quickwit_common::ServiceStream< #[cfg_attr(any(test, feature = "testsuite"), mockall::automock)] #[async_trait::async_trait] pub trait MetastoreService: std::fmt::Debug + Send + Sync + 'static { - /// Creates an index. + ///Creates an index. /// - /// This API creates a new index in the metastore. - /// An error will occur if an index that already exists in the storage is specified. + ///This API creates a new index in the metastore. + ///An error will occur if an index that already exists in the storage is specified. async fn create_index( &self, request: CreateIndexRequest, ) -> crate::metastore::MetastoreResult; - /// Update an index. + ///Update an index. async fn update_index( &self, request: UpdateIndexRequest, ) -> crate::metastore::MetastoreResult; - /// Returns the `IndexMetadata` of an index identified by its IndexID or its IndexUID. + ///Returns the `IndexMetadata` of an index identified by its IndexID or its IndexUID. async fn index_metadata( &self, request: IndexMetadataRequest, ) -> crate::metastore::MetastoreResult; - /// Fetches the metadata of a list of indexes identified by their Index IDs or UIDs. + ///Fetches the metadata of a list of indexes identified by their Index IDs or UIDs. async fn indexes_metadata( &self, request: IndexesMetadataRequest, ) -> crate::metastore::MetastoreResult; - /// Gets an indexes metadatas. + ///Gets an indexes metadatas. async fn list_indexes_metadata( &self, request: ListIndexesMetadataRequest, ) -> crate::metastore::MetastoreResult; - /// Deletes an index + ///Deletes an index async fn delete_index( &self, request: DeleteIndexRequest, ) -> crate::metastore::MetastoreResult; - /// Streams splits from index. + ///Streams splits from index. async fn list_splits( &self, request: ListSplitsRequest, ) -> crate::metastore::MetastoreResult>; - /// Stages several splits. + ///Stages several splits. async fn stage_splits( &self, request: StageSplitsRequest, ) -> crate::metastore::MetastoreResult; - /// Publishes split. + ///Publishes split. async fn publish_splits( &self, request: PublishSplitsRequest, ) -> crate::metastore::MetastoreResult; - /// Marks splits for deletion. + ///Marks splits for deletion. async fn mark_splits_for_deletion( &self, request: MarkSplitsForDeletionRequest, ) -> crate::metastore::MetastoreResult; - /// Deletes splits. + ///Deletes splits. async fn delete_splits( &self, request: DeleteSplitsRequest, ) -> crate::metastore::MetastoreResult; - /// Adds a source. + ///Adds a source. async fn add_source( &self, request: AddSourceRequest, ) -> crate::metastore::MetastoreResult; - /// Updates a source. + ///Updates a source. async fn update_source( &self, request: UpdateSourceRequest, ) -> crate::metastore::MetastoreResult; - /// Toggles (turns on or off) source. + ///Toggles (turns on or off) source. async fn toggle_source( &self, request: ToggleSourceRequest, ) -> crate::metastore::MetastoreResult; - /// Removes source. + ///Removes source. async fn delete_source( &self, request: DeleteSourceRequest, ) -> crate::metastore::MetastoreResult; - /// Resets source checkpoint. + ///Resets source checkpoint. async fn reset_source_checkpoint( &self, request: ResetSourceCheckpointRequest, ) -> crate::metastore::MetastoreResult; - /// Gets last opstamp for a given `index_id`. + ///Gets last opstamp for a given `index_id`. async fn last_delete_opstamp( &self, request: LastDeleteOpstampRequest, ) -> crate::metastore::MetastoreResult; - /// Creates a delete task. + ///Creates a delete task. async fn create_delete_task( &self, request: DeleteQuery, ) -> crate::metastore::MetastoreResult; - /// Updates splits `delete_opstamp`. + ///Updates splits `delete_opstamp`. async fn update_splits_delete_opstamp( &self, request: UpdateSplitsDeleteOpstampRequest, ) -> crate::metastore::MetastoreResult; - /// Lists delete tasks with `delete_task.opstamp` > `opstamp_start` for a given `index_id`. + ///Lists delete tasks with `delete_task.opstamp` > `opstamp_start` for a given `index_id`. async fn list_delete_tasks( &self, request: ListDeleteTasksRequest, ) -> crate::metastore::MetastoreResult; - /// Lists splits with `split.delete_opstamp` < `delete_opstamp` for a given `index_id`. + ///Lists splits with `split.delete_opstamp` \< `delete_opstamp` for a given `index_id`. async fn list_stale_splits( &self, request: ListStaleSplitsRequest, ) -> crate::metastore::MetastoreResult; - /// Shard API + ///Shard API /// - /// Note that for the file-backed metastore implementation, the requests are not processed atomically. - /// Indeed, each request comprises one or more subrequests that target different indexes and sources processed - /// independently. Responses list the requests that succeeded or failed in the fields `successes` and - /// `failures`. + ///Note that for the file-backed metastore implementation, the requests are not processed atomically. + ///Indeed, each request comprises one or more subrequests that target different indexes and sources processed + ///independently. Responses list the requests that succeeded or failed in the fields `successes` and + ///`failures`. async fn open_shards( &self, request: OpenShardsRequest, ) -> crate::metastore::MetastoreResult; - /// Acquires a set of shards for indexing. This RPC locks the shards for publishing thanks to a publish token and only - /// the last indexer that has acquired the shards is allowed to publish. The response returns for each subrequest the - /// list of acquired shards along with the positions to index from. + ///Acquires a set of shards for indexing. This RPC locks the shards for publishing thanks to a publish token and only + ///the last indexer that has acquired the shards is allowed to publish. The response returns for each subrequest the + ///list of acquired shards along with the positions to index from. /// - /// If a requested shard is missing, this method does not return an error. It should simply return the list of - /// shards that were actually acquired. + ///If a requested shard is missing, this method does not return an error. It should simply return the list of + ///shards that were actually acquired. /// - /// For this reason, AcquireShards.acquire_shards may return less subresponse than there was in the request. - /// Also they may be returned in any order. + ///For this reason, AcquireShards.acquire_shards may return less subresponse than there was in the request. + ///Also they may be returned in any order. async fn acquire_shards( &self, request: AcquireShardsRequest, ) -> crate::metastore::MetastoreResult; - /// Deletes a set of shards. This RPC deletes the shards from the metastore. - /// If the shard did not exist to begin with, the operation is successful and does not return any error. + ///Deletes a set of shards. This RPC deletes the shards from the metastore. + ///If the shard did not exist to begin with, the operation is successful and does not return any error. async fn delete_shards( &self, request: DeleteShardsRequest, ) -> crate::metastore::MetastoreResult; - /// Deletes outdated shards. This RPC deletes the shards from the metastore. + ///Deletes outdated shards. This RPC deletes the shards from the metastore. async fn prune_shards( &self, request: PruneShardsRequest, @@ -909,32 +909,32 @@ pub trait MetastoreService: std::fmt::Debug + Send + Sync + 'static { &self, request: ListShardsRequest, ) -> crate::metastore::MetastoreResult; - /// Creates an index template. + ///Creates an index template. async fn create_index_template( &self, request: CreateIndexTemplateRequest, ) -> crate::metastore::MetastoreResult; - /// Fetches an index template. + ///Fetches an index template. async fn get_index_template( &self, request: GetIndexTemplateRequest, ) -> crate::metastore::MetastoreResult; - /// Finds matching index templates. + ///Finds matching index templates. async fn find_index_template_matches( &self, request: FindIndexTemplateMatchesRequest, ) -> crate::metastore::MetastoreResult; - /// Returns all the index templates. + ///Returns all the index templates. async fn list_index_templates( &self, request: ListIndexTemplatesRequest, ) -> crate::metastore::MetastoreResult; - /// Deletes index templates. + ///Deletes index templates. async fn delete_index_templates( &self, request: DeleteIndexTemplatesRequest, ) -> crate::metastore::MetastoreResult; - /// Get cluster identity + ///Get cluster identity async fn get_cluster_identity( &self, request: GetClusterIdentityRequest, @@ -5973,18 +5973,25 @@ pub mod metastore_service_grpc_client { /// We rely on atomically transitioning the status of splits. /// /// The split state goes through the following life cycle: + /// /// 1. `Staged` - /// - Start uploading the split files. + /// + /// * Start uploading the split files. + /// /// 2. `Published` - /// - Uploading the split files is complete and the split is searchable. + /// + /// * Uploading the split files is complete and the split is searchable. + /// /// 3. `MarkedForDeletion` - /// - Mark the split for deletion. + /// + /// * Mark the split for deletion. /// /// If a split has a file in the storage, it MUST be registered in the metastore, /// and its state can be as follows: - /// - `Staged`: The split is almost ready. Some of its files may have been uploaded in the storage. - /// - `Published`: The split is ready and published. - /// - `MarkedForDeletion`: The split is marked for deletion. + /// + /// * `Staged`: The split is almost ready. Some of its files may have been uploaded in the storage. + /// * `Published`: The split is ready and published. + /// * `MarkedForDeletion`: The split is marked for deletion. /// /// Before creating any file, we need to stage the split. If there is a failure, upon recovery, we /// schedule for deletion all the staged splits. A client may not necessarily remove files from @@ -5999,13 +6006,14 @@ pub mod metastore_service_grpc_client { /// /// Quickwit needs a way to track that a delete task has been applied to a split. This is ensured /// by two mechanisms: - /// - On creation of a delete task, we give to the task a monotically increasing opstamp (uniqueness - /// and monotonically increasing must be true at the index level). - /// - When a delete task is executed on a split, that is when the documents matched by the search - /// query are removed from the splits, we update the split's `delete_opstamp` to the value of the - /// task's opstamp. This marks the split as "up-to-date" regarding this delete task. If new delete - /// tasks are added, we will know that we need to run these delete tasks on the splits as its - /// `delete_optstamp` will be inferior to the `opstamp` of the new tasks. + /// + /// * On creation of a delete task, we give to the task a monotically increasing opstamp (uniqueness + /// and monotonically increasing must be true at the index level). + /// * When a delete task is executed on a split, that is when the documents matched by the search + /// query are removed from the splits, we update the split's `delete_opstamp` to the value of the + /// task's opstamp. This marks the split as "up-to-date" regarding this delete task. If new delete + /// tasks are added, we will know that we need to run these delete tasks on the splits as its + /// `delete_optstamp` will be inferior to the `opstamp` of the new tasks. /// /// For splits created after a given delete task, Quickwit's indexing ensures that these splits /// are created with a `delete_opstamp` equal the latest opstamp of the tasks of the @@ -6109,7 +6117,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/CreateIndex", ); @@ -6136,7 +6144,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/UpdateIndex", ); @@ -6163,7 +6171,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/IndexMetadata", ); @@ -6193,7 +6201,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/IndexesMetadata", ); @@ -6223,7 +6231,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListIndexesMetadata", ); @@ -6250,7 +6258,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/DeleteIndex", ); @@ -6277,7 +6285,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListSplits", ); @@ -6301,7 +6309,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/StageSplits", ); @@ -6325,7 +6333,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/PublishSplits", ); @@ -6352,7 +6360,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/MarkSplitsForDeletion", ); @@ -6379,7 +6387,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/DeleteSplits", ); @@ -6406,7 +6414,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/AddSource", ); @@ -6430,7 +6438,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/UpdateSource", ); @@ -6457,7 +6465,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ToggleSource", ); @@ -6484,7 +6492,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/DeleteSource", ); @@ -6511,7 +6519,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ResetSourceCheckpoint", ); @@ -6541,7 +6549,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/LastDeleteOpstamp", ); @@ -6568,7 +6576,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/CreateDeleteTask", ); @@ -6598,7 +6606,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/UpdateSplitsDeleteOpstamp", ); @@ -6628,7 +6636,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListDeleteTasks", ); @@ -6642,7 +6650,7 @@ pub mod metastore_service_grpc_client { ); self.inner.unary(req, path, codec).await } - /// Lists splits with `split.delete_opstamp` < `delete_opstamp` for a given `index_id`. + /// Lists splits with `split.delete_opstamp` \< `delete_opstamp` for a given `index_id`. pub async fn list_stale_splits( &mut self, request: impl tonic::IntoRequest, @@ -6658,7 +6666,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListStaleSplits", ); @@ -6693,7 +6701,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/OpenShards", ); @@ -6728,7 +6736,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/AcquireShards", ); @@ -6759,7 +6767,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/DeleteShards", ); @@ -6786,7 +6794,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/PruneShards", ); @@ -6812,7 +6820,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListShards", ); @@ -6836,7 +6844,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/CreateIndexTemplate", ); @@ -6866,7 +6874,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/GetIndexTemplate", ); @@ -6896,7 +6904,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/FindIndexTemplateMatches", ); @@ -6926,7 +6934,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/ListIndexTemplates", ); @@ -6953,7 +6961,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/DeleteIndexTemplates", ); @@ -6983,7 +6991,7 @@ pub mod metastore_service_grpc_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.metastore.MetastoreService/GetClusterIdentity", ); @@ -7145,7 +7153,7 @@ pub mod metastore_service_grpc_server { tonic::Response, tonic::Status, >; - /// Lists splits with `split.delete_opstamp` < `delete_opstamp` for a given `index_id`. + /// Lists splits with `split.delete_opstamp` \< `delete_opstamp` for a given `index_id`. async fn list_stale_splits( &self, request: tonic::Request, @@ -7255,18 +7263,25 @@ pub mod metastore_service_grpc_server { /// We rely on atomically transitioning the status of splits. /// /// The split state goes through the following life cycle: + /// /// 1. `Staged` - /// - Start uploading the split files. + /// + /// * Start uploading the split files. + /// /// 2. `Published` - /// - Uploading the split files is complete and the split is searchable. + /// + /// * Uploading the split files is complete and the split is searchable. + /// /// 3. `MarkedForDeletion` - /// - Mark the split for deletion. + /// + /// * Mark the split for deletion. /// /// If a split has a file in the storage, it MUST be registered in the metastore, /// and its state can be as follows: - /// - `Staged`: The split is almost ready. Some of its files may have been uploaded in the storage. - /// - `Published`: The split is ready and published. - /// - `MarkedForDeletion`: The split is marked for deletion. + /// + /// * `Staged`: The split is almost ready. Some of its files may have been uploaded in the storage. + /// * `Published`: The split is ready and published. + /// * `MarkedForDeletion`: The split is marked for deletion. /// /// Before creating any file, we need to stage the split. If there is a failure, upon recovery, we /// schedule for deletion all the staged splits. A client may not necessarily remove files from @@ -7281,13 +7296,14 @@ pub mod metastore_service_grpc_server { /// /// Quickwit needs a way to track that a delete task has been applied to a split. This is ensured /// by two mechanisms: - /// - On creation of a delete task, we give to the task a monotically increasing opstamp (uniqueness - /// and monotonically increasing must be true at the index level). - /// - When a delete task is executed on a split, that is when the documents matched by the search - /// query are removed from the splits, we update the split's `delete_opstamp` to the value of the - /// task's opstamp. This marks the split as "up-to-date" regarding this delete task. If new delete - /// tasks are added, we will know that we need to run these delete tasks on the splits as its - /// `delete_optstamp` will be inferior to the `opstamp` of the new tasks. + /// + /// * On creation of a delete task, we give to the task a monotically increasing opstamp (uniqueness + /// and monotonically increasing must be true at the index level). + /// * When a delete task is executed on a split, that is when the documents matched by the search + /// query are removed from the splits, we update the split's `delete_opstamp` to the value of the + /// task's opstamp. This marks the split as "up-to-date" regarding this delete task. If new delete + /// tasks are added, we will know that we need to run these delete tasks on the splits as its + /// `delete_optstamp` will be inferior to the `opstamp` of the new tasks. /// /// For splits created after a given delete task, Quickwit's indexing ensures that these splits /// are created with a `delete_opstamp` equal the latest opstamp of the tasks of the @@ -7400,7 +7416,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = CreateIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7446,7 +7462,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = UpdateIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7492,7 +7508,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = IndexMetadataSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7541,7 +7557,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = IndexesMetadataSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7590,7 +7606,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListIndexesMetadataSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7636,7 +7652,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteIndexSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7683,7 +7699,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7729,7 +7745,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = StageSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7775,7 +7791,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = PublishSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7824,7 +7840,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = MarkSplitsForDeletionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7870,7 +7886,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7916,7 +7932,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = AddSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -7962,7 +7978,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = UpdateSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8008,7 +8024,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ToggleSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8054,7 +8070,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteSourceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8103,7 +8119,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ResetSourceCheckpointSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8152,7 +8168,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = LastDeleteOpstampSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8201,7 +8217,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = CreateDeleteTaskSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8255,7 +8271,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = UpdateSplitsDeleteOpstampSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8304,7 +8320,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListDeleteTasksSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8353,7 +8369,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListStaleSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8399,7 +8415,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = OpenShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8445,7 +8461,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = AcquireShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8491,7 +8507,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8537,7 +8553,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = PruneShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8583,7 +8599,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListShardsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8632,7 +8648,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = CreateIndexTemplateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8681,7 +8697,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = GetIndexTemplateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8734,7 +8750,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = FindIndexTemplateMatchesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8783,7 +8799,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = ListIndexTemplatesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8832,7 +8848,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = DeleteIndexTemplatesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -8881,7 +8897,7 @@ pub mod metastore_service_grpc_server { let inner = self.inner.clone(); let fut = async move { let method = GetClusterIdentitySvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs index 07bbdb5ce21..e1201ce7a0e 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs @@ -1,7 +1,7 @@ // This file is @generated by prost-build. /// / Scroll Request #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScrollRequest { /// / The `scroll_id` is the given in the response of a search request including a scroll. #[prost(string, tag = "1")] @@ -10,7 +10,7 @@ pub struct ScrollRequest { pub scroll_ttl_secs: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutKvRequest { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, @@ -20,22 +20,22 @@ pub struct PutKvRequest { pub ttl_secs: u32, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutKvResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetKvRequest { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetKvResponse { #[prost(bytes = "vec", optional, tag = "1")] pub payload: ::core::option::Option<::prost::alloc::vec::Vec>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportSplit { /// Split id (ULID format `01HAV29D4XY3D462FS3D8K5Q2H`) #[prost(string, tag = "2")] @@ -51,10 +51,10 @@ pub struct ReportSplitsRequest { pub report_splits: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportSplitsResponse {} #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListFieldsRequest { /// Index ID patterns #[prost(string, repeated, tag = "1")] @@ -65,7 +65,7 @@ pub struct ListFieldsRequest { pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Time filter, expressed in seconds since epoch. /// That filter is to be interpreted as the semi-open interval: - /// [start_timestamp, end_timestamp). + /// \[start_timestamp, end_timestamp). #[prost(int64, optional, tag = "3")] pub start_timestamp: ::core::option::Option, #[prost(int64, optional, tag = "4")] @@ -96,7 +96,7 @@ pub struct ListFieldsResponse { pub fields: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListFieldsEntryResponse { #[prost(string, tag = "1")] pub field_name: ::prost::alloc::string::String, @@ -131,7 +131,7 @@ pub struct ListFields { pub fields: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Eq, Hash)] +#[derive(Hash, Eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchRequest { /// Index ID patterns @@ -142,7 +142,7 @@ pub struct SearchRequest { pub query_ast: ::prost::alloc::string::String, /// Time filter, expressed in seconds since epoch. /// That filter is to be interpreted as the semi-open interval: - /// [start_timestamp, end_timestamp). + /// \[start_timestamp, end_timestamp). /// If the query AST contains a range query over the timestamp field, /// then the the bounds of the range query are used directly and /// these two fields are ignored. @@ -157,7 +157,7 @@ pub struct SearchRequest { /// can be used for pagination. /// /// E.g. - /// The results with rank [start_offset..start_offset + max_hits) are returned. + /// The results with rank \[start_offset..start_offset + max_hits) are returned. #[prost(uint64, tag = "7")] pub start_offset: u64, /// json serialized aggregation_request @@ -176,7 +176,7 @@ pub struct SearchRequest { pub scroll_ttl_secs: ::core::option::Option, /// Document with sort tuple smaller or equal to this are discarded to /// enable pagination. - /// If split_id is empty, no comparison with _shard_doc should be done + /// If split_id is empty, no comparison with \_shard_doc should be done #[prost(message, optional, tag = "16")] pub search_after: ::core::option::Option, #[prost(enumeration = "CountHits", tag = "17")] @@ -187,8 +187,7 @@ pub struct SearchRequest { pub ignore_missing_indexes: bool, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Eq, Hash)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SortField { #[prost(string, tag = "1")] pub field_name: ::prost::alloc::string::String, @@ -235,13 +234,13 @@ pub struct SearchResponse { pub num_successful_splits: u64, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SearchPlanResponse { #[prost(string, tag = "1")] pub result: ::prost::alloc::string::String, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitSearchError { /// The searcherror that occurred formatted as string. #[prost(string, tag = "1")] @@ -276,7 +275,7 @@ pub struct LeafSearchRequest { pub index_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResourceStats { #[prost(uint64, tag = "1")] pub short_lived_cache_num_bytes: u64, @@ -305,7 +304,7 @@ pub struct LeafRequestRef { pub split_offsets: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitIdAndFooterOffsets { /// Index split id to apply the query on. /// This id is resolved from the index_uri defined in the search_request. @@ -333,10 +332,11 @@ pub struct SplitIdAndFooterOffsets { /// It is very different from a quickwit json doc. /// /// For instance: -/// - it may contain a _source and a _dynamic field. -/// - since tantivy has no notion of cardinality, +/// +/// * it may contain a \_source and a \_dynamic field. +/// * since tantivy has no notion of cardinality, /// all fields are arrays. -/// - since tantivy has no notion of object, the object is +/// * since tantivy has no notion of object, the object is /// flattened by concatenating the path to the root. /// /// See `quickwit_search::convert_leaf_hit` @@ -381,11 +381,12 @@ pub struct Hit { /// emits an decreasing mapping of this fast field. /// /// In case of a tie, quickwit uses the increasing order of -/// - the split_id, -/// - the segment_ord, -/// - the doc id. +/// +/// * the split_id, +/// * the segment_ord, +/// * the doc id. #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Eq, Hash)] +#[derive(Hash, Eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PartialHit { #[prost(message, optional, tag = "10")] @@ -456,7 +457,7 @@ pub struct LeafSearchResponse { pub resource_stats: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnippetRequest { #[prost(string, repeated, tag = "1")] pub snippet_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -492,7 +493,7 @@ pub struct FetchDocsResponse { pub hits: ::prost::alloc::vec::Vec, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListTermsRequest { /// Index ID patterns #[prost(string, repeated, tag = "1")] @@ -515,7 +516,7 @@ pub struct ListTermsRequest { pub end_key: ::core::option::Option<::prost::alloc::vec::Vec>, } #[derive(serde::Serialize, serde::Deserialize, utoipa::ToSchema)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListTermsResponse { /// Number of hits matching the query. #[prost(uint64, tag = "1")] @@ -654,7 +655,7 @@ pub enum SortOrder { Asc = 0, /// Descending order. /// - /// < This will be the default value; + /// \< This will be the default value; Desc = 1, } impl SortOrder { @@ -816,7 +817,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/RootSearch", ); @@ -828,10 +829,11 @@ pub mod search_service_client { /// Perform a leaf search on a given set of splits. /// /// It is like a regular search except that: - /// - the node should perform the search locally instead of dispatching - /// it to other nodes. - /// - it should be applied on the given subset of splits - /// - Hit content is not fetched, and we instead return so called `PartialHit`. + /// + /// * the node should perform the search locally instead of dispatching + /// it to other nodes. + /// * it should be applied on the given subset of splits + /// * Hit content is not fetched, and we instead return so called `PartialHit`. pub async fn leaf_search( &mut self, request: impl tonic::IntoRequest, @@ -847,7 +849,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/LeafSearch", ); @@ -873,7 +875,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/FetchDocs", ); @@ -902,7 +904,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/RootListTerms", ); @@ -916,9 +918,10 @@ pub mod search_service_client { /// Performs a leaf list terms on a given set of splits. /// /// It is like a regular list term except that: - /// - the node should perform the listing locally instead of dispatching - /// it to other nodes. - /// - it should be applied on the given subset of splits + /// + /// * the node should perform the listing locally instead of dispatching + /// it to other nodes. + /// * it should be applied on the given subset of splits pub async fn leaf_list_terms( &mut self, request: impl tonic::IntoRequest, @@ -934,7 +937,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/LeafListTerms", ); @@ -958,7 +961,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/Scroll", ); @@ -981,7 +984,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/PutKV", ); @@ -1004,7 +1007,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/GetKV", ); @@ -1028,7 +1031,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/ReportSplits", ); @@ -1054,7 +1057,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/ListFields", ); @@ -1078,7 +1081,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/LeafListFields", ); @@ -1105,7 +1108,7 @@ pub mod search_service_client { format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/quickwit.search.SearchService/SearchPlan", ); @@ -1141,10 +1144,11 @@ pub mod search_service_server { /// Perform a leaf search on a given set of splits. /// /// It is like a regular search except that: - /// - the node should perform the search locally instead of dispatching - /// it to other nodes. - /// - it should be applied on the given subset of splits - /// - Hit content is not fetched, and we instead return so called `PartialHit`. + /// + /// * the node should perform the search locally instead of dispatching + /// it to other nodes. + /// * it should be applied on the given subset of splits + /// * Hit content is not fetched, and we instead return so called `PartialHit`. async fn leaf_search( &self, request: tonic::Request, @@ -1176,9 +1180,10 @@ pub mod search_service_server { /// Performs a leaf list terms on a given set of splits. /// /// It is like a regular list term except that: - /// - the node should perform the listing locally instead of dispatching - /// it to other nodes. - /// - it should be applied on the given subset of splits + /// + /// * the node should perform the listing locally instead of dispatching + /// it to other nodes. + /// * it should be applied on the given subset of splits async fn leaf_list_terms( &self, request: tonic::Request, @@ -1339,7 +1344,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = RootSearchSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1384,7 +1389,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = LeafSearchSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1429,7 +1434,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = FetchDocsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1474,7 +1479,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = RootListTermsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1519,7 +1524,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = LeafListTermsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1564,7 +1569,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = ScrollSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1608,7 +1613,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = PutKVSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1652,7 +1657,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = GetKVSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1697,7 +1702,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = ReportSplitsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1742,7 +1747,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = ListFieldsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1788,7 +1793,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = LeafListFieldsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, @@ -1833,7 +1838,7 @@ pub mod search_service_server { let inner = self.inner.clone(); let fut = async move { let method = SearchPlanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, diff --git a/quickwit/quickwit-proto/src/lib.rs b/quickwit/quickwit-proto/src/lib.rs index 620faccbe76..a7ace65ac03 100644 --- a/quickwit/quickwit-proto/src/lib.rs +++ b/quickwit/quickwit-proto/src/lib.rs @@ -14,6 +14,7 @@ #![allow(clippy::derive_partial_eq_without_eq)] #![allow(clippy::disallowed_methods)] +#![allow(clippy::doc_lazy_continuation)] #![allow(rustdoc::invalid_html_tags)] use std::cmp::Ordering;