Adding tonic with gzip feature
This commit is contained in:
parent
58b05ce157
commit
950559b5aa
|
@ -1264,6 +1264,7 @@ dependencies = [
|
||||||
"solana-logger",
|
"solana-logger",
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tonic",
|
||||||
"tonic-health",
|
"tonic-health",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
@ -3628,6 +3629,7 @@ dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"base64 0.21.7",
|
"base64 0.21.7",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
"flate2",
|
||||||
"h2",
|
"h2",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
|
|
|
@ -31,6 +31,7 @@ bincode = "1.3.3"
|
||||||
|
|
||||||
csv = "1.3.0"
|
csv = "1.3.0"
|
||||||
|
|
||||||
|
tonic = { version="0.10.2", features=["gzip"] }
|
||||||
tonic-health = "0.10.2"
|
tonic-health = "0.10.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -5,6 +5,7 @@ use yellowstone_grpc_proto::geyser::geyser_client::GeyserClient;
|
||||||
use yellowstone_grpc_proto::geyser::SubscribeRequest;
|
use yellowstone_grpc_proto::geyser::SubscribeRequest;
|
||||||
use yellowstone_grpc_proto::prost::bytes::Bytes;
|
use yellowstone_grpc_proto::prost::bytes::Bytes;
|
||||||
use yellowstone_grpc_proto::tonic;
|
use yellowstone_grpc_proto::tonic;
|
||||||
|
use tonic::codec::CompressionEncoding;
|
||||||
use yellowstone_grpc_proto::tonic::metadata::errors::InvalidMetadataValue;
|
use yellowstone_grpc_proto::tonic::metadata::errors::InvalidMetadataValue;
|
||||||
use yellowstone_grpc_proto::tonic::metadata::AsciiMetadataValue;
|
use yellowstone_grpc_proto::tonic::metadata::AsciiMetadataValue;
|
||||||
use yellowstone_grpc_proto::tonic::service::Interceptor;
|
use yellowstone_grpc_proto::tonic::service::Interceptor;
|
||||||
|
@ -87,7 +88,9 @@ where
|
||||||
let client = GeyserGrpcClient::new(
|
let client = GeyserGrpcClient::new(
|
||||||
HealthClient::with_interceptor(channel.clone(), interceptor.clone()),
|
HealthClient::with_interceptor(channel.clone(), interceptor.clone()),
|
||||||
GeyserClient::with_interceptor(channel, interceptor)
|
GeyserClient::with_interceptor(channel, interceptor)
|
||||||
.max_decoding_message_size(GeyserGrpcClient::max_decoding_message_size()),
|
.max_decoding_message_size(GeyserGrpcClient::max_decoding_message_size())
|
||||||
|
.accept_compressed(CompressionEncoding::Gzip)
|
||||||
|
.send_compressed(CompressionEncoding::Gzip),
|
||||||
);
|
);
|
||||||
Ok(client)
|
Ok(client)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue