From e3298a49577d959e85e46fef5a6e205820e75333 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Sat, 29 Jul 2023 10:33:52 +0800 Subject: [PATCH] Fix build Signed-off-by: Xuanwo --- Cargo.lock | 5 ----- src/sinks/mod.rs | 4 ++-- src/sinks/sftp/config.rs | 13 ++++++------- src/sinks/sftp/test.rs | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc2cf2e73fb61..ed27bc0aa8862 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10714,8 +10714,3 @@ dependencies = [ "libc", "pkg-config", ] - -[[patch.unused]] -name = "tokio-util" -version = "0.7.4" -source = "git+https://github.com/vectordotdev/tokio?branch=tokio-util-0.7.4-framed-read-continue-on-error#53a17f257b599a9d18bd75249de98d0b6fc28cfa" diff --git a/src/sinks/mod.rs b/src/sinks/mod.rs index 73373f64b1392..043a9e700e874 100644 --- a/src/sinks/mod.rs +++ b/src/sinks/mod.rs @@ -87,6 +87,8 @@ pub mod redis; pub mod s3_common; #[cfg(feature = "sinks-sematext")] pub mod sematext; +#[cfg(feature = "sinks-sftp")] +pub mod sftp; #[cfg(feature = "sinks-socket")] pub mod socket; #[cfg(feature = "sinks-splunk_hec")] @@ -99,8 +101,6 @@ pub mod vector; pub mod webhdfs; #[cfg(feature = "sinks-websocket")] pub mod websocket; -#[cfg(feature = "sinks-sftp")] -pub mod sftp; pub use vector_core::{config::Input, sink::VectorSink}; diff --git a/src/sinks/sftp/config.rs b/src/sinks/sftp/config.rs index 7c7e7cab7433a..63837e35f6809 100644 --- a/src/sinks/sftp/config.rs +++ b/src/sinks/sftp/config.rs @@ -1,6 +1,5 @@ use codecs::{encoding::Framer, JsonSerializerConfig, NewlineDelimitedEncoderConfig}; -use opendal::{layers::LoggingLayer, services::Webhdfs, Operator}; -use opendal::Scheme::Sftp; +use opendal::{layers::LoggingLayer, services::Sftp, Operator}; use tower::ServiceBuilder; use vector_config::configurable_component; use vector_core::{ @@ -84,9 +83,9 @@ pub struct SftpConfig { #[configurable(derived)] #[serde( - default, - deserialize_with = "crate::serde::bool_or_struct", - skip_serializing_if = "crate::serde::skip_serializing_if_default" + default, + deserialize_with = "crate::serde::bool_or_struct", + skip_serializing_if = "crate::serde::skip_serializing_if_default" )] pub acknowledgements: AcknowledgementsConfig, } @@ -99,7 +98,7 @@ impl GenerateConfig for SftpConfig { endpoint: "127.0.0.1:22".to_string(), user: "ubuntu".to_string(), - key: "/home/ubuntu/.ssh/is_rsa".to_string(), + key: "/home/ubuntu/.ssh/id_rsa".to_string(), known_hosts_strategy: "strict".to_string(), encoding: ( Some(NewlineDelimitedEncoderConfig::new()), @@ -111,7 +110,7 @@ impl GenerateConfig for SftpConfig { acknowledgements: Default::default(), }) - .unwrap() + .unwrap() } } diff --git a/src/sinks/sftp/test.rs b/src/sinks/sftp/test.rs index 6ddc9376fa1c1..eb67988b59104 100644 --- a/src/sinks/sftp/test.rs +++ b/src/sinks/sftp/test.rs @@ -22,7 +22,7 @@ fn default_config(encoding: EncodingConfigWithFraming) -> SftpConfig { prefix: "%F/".to_string(), endpoint: "127.0.0.1:22".to_string(), user: "ubuntu".to_string(), - key: "/home/ubuntu/.ssh/is_rsa".to_string(), + key: "/home/ubuntu/.ssh/id_rsa".to_string(), known_hosts_strategy: "strict".to_string(), encoding, compression: Compression::gzip_default(),