risingwave_connector/source/filesystem/s3/
mod.rs1pub mod enumerator;
15
16use serde::Deserialize;
17
18use crate::source::SourceProperties;
19use crate::source::filesystem::file_common::CompressionFormat;
20use crate::source::util::dummy::{
21 DummyProperties, DummySourceReader, DummySplit, DummySplitEnumerator,
22};
23
24pub const LEGACY_S3_CONNECTOR: &str = "s3";
26
27#[derive(Clone, Debug, Deserialize, PartialEq, with_options::WithOptions)]
29pub struct S3PropertiesCommon {
30 #[serde(rename = "s3.region_name")]
31 pub region_name: String,
32 #[serde(rename = "s3.bucket_name")]
33 pub bucket_name: String,
34 #[serde(rename = "match_pattern", default)]
35 pub match_pattern: Option<String>,
36 #[serde(rename = "s3.credentials.access", default)]
37 pub access: Option<String>,
38 #[serde(rename = "s3.credentials.secret", default)]
39 pub secret: Option<String>,
40 #[serde(rename = "s3.endpoint_url")]
41 pub endpoint_url: Option<String>,
42 #[serde(rename = "compression_format", default = "Default::default")]
43 pub compression_format: CompressionFormat,
44}
45
46#[derive(Debug, Clone, PartialEq)]
47pub struct LegacyS3;
48
49pub type LegacyS3Properties = DummyProperties<LegacyS3>;
52
53pub type LegacyS3SplitEnumerator = DummySplitEnumerator<LegacyS3>;
56
57pub type LegacyFsSplit = DummySplit<LegacyS3>;
58
59impl SourceProperties for LegacyS3Properties {
60 type Split = LegacyFsSplit;
61 type SplitEnumerator = LegacyS3SplitEnumerator;
62 type SplitReader = DummySourceReader<LegacyS3>;
63
64 const SOURCE_NAME: &'static str = LEGACY_S3_CONNECTOR;
65}