Update client dependencies

This commit is contained in:
AsamK 2024-01-31 21:17:23 +01:00
parent 0b33cb55b8
commit 3be1c24b1b
6 changed files with 340 additions and 342 deletions

663
client/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ log = "0.4"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
tokio = { version = "1", features = ["rt", "macros", "net", "rt-multi-thread"] } tokio = { version = "1", features = ["rt", "macros", "net", "rt-multi-thread"] }
jsonrpsee = { version = "0.20.0", features = [ jsonrpsee = { version = "0.21.0", features = [
"macros", "macros",
"async-client", "async-client",
"http-client", "http-client",

View file

@ -1,8 +1,7 @@
use std::path::Path; use std::path::Path;
use jsonrpsee::async_client::ClientBuilder; use jsonrpsee::async_client::ClientBuilder;
use jsonrpsee::core::client::SubscriptionClientT; use jsonrpsee::core::client::{Error, SubscriptionClientT};
use jsonrpsee::core::Error;
use jsonrpsee::http_client::HttpClientBuilder; use jsonrpsee::http_client::HttpClientBuilder;
use jsonrpsee::proc_macros::rpc; use jsonrpsee::proc_macros::rpc;
use serde::Deserialize; use serde::Deserialize;
@ -374,7 +373,9 @@ pub struct JsonLink {
pub device_link_uri: String, pub device_link_uri: String,
} }
pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result<impl SubscriptionClientT, Error> { pub async fn connect_tcp(
tcp: impl ToSocketAddrs,
) -> Result<impl SubscriptionClientT, std::io::Error> {
let (sender, receiver) = super::transports::tcp::connect(tcp).await?; let (sender, receiver) = super::transports::tcp::connect(tcp).await?;
Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) Ok(ClientBuilder::default().build_with_tokio(sender, receiver))
@ -382,7 +383,7 @@ pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result<impl SubscriptionCli
pub async fn connect_unix( pub async fn connect_unix(
socket_path: impl AsRef<Path>, socket_path: impl AsRef<Path>,
) -> Result<impl SubscriptionClientT, Error> { ) -> Result<impl SubscriptionClientT, std::io::Error> {
let (sender, receiver) = super::transports::ipc::connect(socket_path).await?; let (sender, receiver) = super::transports::ipc::connect(socket_path).await?;
Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) Ok(ClientBuilder::default().build_with_tokio(sender, receiver))

View file

@ -1,8 +1,7 @@
use std::{path::PathBuf, time::Duration}; use std::{path::PathBuf, time::Duration};
use clap::Parser; use clap::Parser;
use jsonrpsee::core::client::{Subscription, SubscriptionClientT}; use jsonrpsee::core::client::{Error as RpcError, Subscription, SubscriptionClientT};
use jsonrpsee::core::Error as RpcError;
use serde_json::Value; use serde_json::Value;
use tokio::{select, time::sleep}; use tokio::{select, time::sleep};

View file

@ -1,8 +1,8 @@
use std::io::Error;
use std::path::Path; use std::path::Path;
use futures_util::stream::StreamExt; use futures_util::stream::StreamExt;
use jsonrpsee::core::client::{TransportReceiverT, TransportSenderT}; use jsonrpsee::core::client::{TransportReceiverT, TransportSenderT};
use jsonrpsee::core::Error;
use tokio::net::UnixStream; use tokio::net::UnixStream;
use tokio_util::codec::Decoder; use tokio_util::codec::Decoder;

View file

@ -1,6 +1,7 @@
use std::io::Error;
use futures_util::stream::StreamExt; use futures_util::stream::StreamExt;
use jsonrpsee::core::client::{TransportReceiverT, TransportSenderT}; use jsonrpsee::core::client::{TransportReceiverT, TransportSenderT};
use jsonrpsee::core::Error;
use tokio::net::{TcpStream, ToSocketAddrs}; use tokio::net::{TcpStream, ToSocketAddrs};
use tokio_util::codec::Decoder; use tokio_util::codec::Decoder;