Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump the cargo group across 3 directories with 1 update #3566

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 122 additions & 95 deletions packages/cactus-core-api/Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/cactus-core-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ path = "src/main/rust/pb.rs"


[dependencies]
tonic = {version="0.10.2", features = ["tls"]}
prost = "0.12.3"
tokio = { version = "1.39.2", features = ["macros", "fs"] }
tonic = {version="0.12.3", features = ["tls"]}
prost = "0.13.3"
tokio = { version = "1.40.0", features = ["macros", "fs"] }
serde = {version="1.0.193", features = ["derive"]}

[build-dependencies]
tonic-build = "0.10.2"
tonic-build = "0.12.3"



Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is @generated by prost-build.
/// This message respresents "ACKs" sent between relay-relay,
/// relay-driver and relay-network
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ack {
#[prost(enumeration = "ack::Status", tag = "2")]
Expand Down Expand Up @@ -39,8 +39,8 @@ pub mod ack {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Ok => "OK",
Status::Error => "ERROR",
Self::Ok => "OK",
Self::Error => "ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is @generated by prost-build.
/// the payload to define the data that is being requested
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Query {
#[prost(string, repeated, tag = "1")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is @generated by prost-build.
/// Metadata for a View
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Meta {
/// Underlying distributed ledger protocol.
Expand Down Expand Up @@ -46,10 +46,10 @@ pub mod meta {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Protocol::Bitcoin => "BITCOIN",
Protocol::Ethereum => "ETHEREUM",
Protocol::Fabric => "FABRIC",
Protocol::Corda => "CORDA",
Self::Bitcoin => "BITCOIN",
Self::Ethereum => "ETHEREUM",
Self::Fabric => "FABRIC",
Self::Corda => "CORDA",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -65,7 +65,6 @@ pub mod meta {
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct View {
#[prost(message, optional, tag = "1")]
Expand All @@ -78,7 +77,6 @@ pub struct View {
}
/// View represents the response from a remote network
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewPayload {
#[prost(string, tag = "1")]
Expand All @@ -89,7 +87,6 @@ pub struct ViewPayload {
/// Nested message and enum types in `ViewPayload`.
pub mod view_payload {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum State {
#[prost(message, tag = "2")]
Expand All @@ -101,7 +98,6 @@ pub mod view_payload {
/// the payload that is used for the communication between the requesting relay
/// and its network
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestState {
#[prost(string, tag = "1")]
Expand Down Expand Up @@ -141,10 +137,10 @@ pub mod request_state {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::PendingAck => "PENDING_ACK",
Status::Pending => "PENDING",
Status::Error => "ERROR",
Status::Completed => "COMPLETED",
Self::PendingAck => "PENDING_ACK",
Self::Pending => "PENDING",
Self::Error => "ERROR",
Self::Completed => "COMPLETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -159,7 +155,6 @@ pub mod request_state {
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum State {
#[prost(message, tag = "3")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// This file is @generated by prost-build.
/// Generated client implementations.
pub mod driver_communication_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![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)]
Expand All @@ -22,8 +29,8 @@ pub mod driver_communication_client {
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Expand All @@ -48,7 +55,7 @@ pub mod driver_communication_client {
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DriverCommunicationClient::new(InterceptedService::new(inner, interceptor))
}
Expand Down Expand Up @@ -96,8 +103,7 @@ pub mod driver_communication_client {
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
Expand All @@ -119,11 +125,17 @@ pub mod driver_communication_client {
}
/// Generated server implementations.
pub mod driver_communication_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![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 DriverCommunicationServer.
#[async_trait]
pub trait DriverCommunication: Send + Sync + 'static {
pub trait DriverCommunication: std::marker::Send + std::marker::Sync + 'static {
/// the remote relay sends a RequestDriverState request to its driver with a
/// query defining the data it wants to receive
async fn request_driver_state(
Expand All @@ -135,20 +147,18 @@ pub mod driver_communication_server {
>;
}
#[derive(Debug)]
pub struct DriverCommunicationServer<T: DriverCommunication> {
inner: _Inner<T>,
pub struct DriverCommunicationServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: DriverCommunication> DriverCommunicationServer<T> {
impl<T> DriverCommunicationServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
Expand Down Expand Up @@ -198,8 +208,8 @@ pub mod driver_communication_server {
impl<T, B> tonic::codegen::Service<http::Request<B>> for DriverCommunicationServer<T>
where
T: DriverCommunication,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
Expand All @@ -211,7 +221,6 @@ pub mod driver_communication_server {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/driver.driver.DriverCommunication/RequestDriverState" => {
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -249,7 +258,6 @@ pub mod driver_communication_server {
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RequestDriverStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
Expand All @@ -268,20 +276,25 @@ pub mod driver_communication_server {
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
let mut response = http::Response::new(empty_body());
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<T: DriverCommunication> Clone for DriverCommunicationServer<T> {
impl<T> Clone for DriverCommunicationServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
Expand All @@ -293,18 +306,9 @@ pub mod driver_communication_server {
}
}
}
impl<T: DriverCommunication> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: DriverCommunication> tonic::server::NamedService
for DriverCommunicationServer<T> {
const NAME: &'static str = "driver.driver.DriverCommunication";
/// Generated gRPC service name
pub const SERVICE_NAME: &str = "driver.driver.DriverCommunication";
impl<T> tonic::server::NamedService for DriverCommunicationServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
Loading
Loading