Skip to content

Commit 6087edb

Browse files
committed
refactor(log-ingestor): Replace AwsCredentials with AwsAuthentication in CLP ingestion connector
1 parent 8517918 commit 6087edb

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

components/log-ingestor/src/ingestion_job_manager/clp_ingestion.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use async_trait::async_trait;
44
use clp_rust_utils::{
55
clp_config::{
66
AwsAuthentication,
7-
AwsCredentials,
87
package::{
98
config::{ArchiveOutput, Config as ClpConfig, LogsInput},
109
credentials::Credentials as ClpCredentials,
@@ -157,7 +156,7 @@ impl ClpIngestionJobContext {
157156
pub struct ClpDbIngestionConnector {
158157
db_pool: MySqlPool,
159158
channel_capacity: usize,
160-
aws_credentials: AwsCredentials,
159+
aws_authentication: AwsAuthentication,
161160
archive_output_config: ArchiveOutput,
162161
buffer_flush_timeout: Duration,
163162
buffer_flush_threshold: u64,
@@ -197,10 +196,8 @@ impl ClpDbIngestionConnector {
197196
.as_ref()
198197
.expect("log_ingestor configuration is missing");
199198

200-
let aws_credentials = match clp_config.logs_input {
201-
LogsInput::S3 { config } => match config.aws_authentication {
202-
AwsAuthentication::Credentials { credentials } => credentials,
203-
},
199+
let aws_authentication = match clp_config.logs_input {
200+
LogsInput::S3 { config } => config.aws_authentication,
204201
LogsInput::Fs { .. } => {
205202
panic!(
206203
"Invalid CLP config: Unsupported logs input type. The current implementation \
@@ -221,7 +218,7 @@ impl ClpDbIngestionConnector {
221218
let connector = Self {
222219
db_pool: mysql_pool,
223220
channel_capacity: log_ingestor_config.channel_capacity,
224-
aws_credentials,
221+
aws_authentication,
225222
archive_output_config: clp_config.archive_output.clone(),
226223
buffer_flush_timeout: Duration::from_secs(log_ingestor_config.buffer_flush_timeout_sec),
227224
buffer_flush_threshold: log_ingestor_config.buffer_flush_threshold,
@@ -430,7 +427,7 @@ impl ClpDbIngestionConnector {
430427

431428
let submitter = CompressionJobSubmitter::new(
432429
compression_state.clone(),
433-
self.aws_credentials.clone(),
430+
self.aws_authentication.clone(),
434431
&self.archive_output_config,
435432
config.as_base_config(),
436433
);

0 commit comments

Comments
 (0)