Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Jul 29, 2023
1 parent 23426d0 commit e3298a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
5 changes: 0 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/sinks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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};

Expand Down
13 changes: 6 additions & 7 deletions src/sinks/sftp/config.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down Expand Up @@ -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,
}
Expand All @@ -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()),
Expand All @@ -111,7 +110,7 @@ impl GenerateConfig for SftpConfig {

acknowledgements: Default::default(),
})
.unwrap()
.unwrap()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sinks/sftp/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit e3298a4

Please sign in to comment.