Skip to content

Commit

Permalink
refactor: remove RemoteUploader
Browse files Browse the repository at this point in the history
  • Loading branch information
sfauvel committed Dec 11, 2024
1 parent 4179b20 commit d7d93fe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 96 deletions.
15 changes: 6 additions & 9 deletions mithril-aggregator/src/dependency_injection/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ use crate::{
AggregatorConfig, AggregatorRunner, AggregatorRuntime, CompressedArchiveSnapshotter,
Configuration, DependencyContainer, DumbSnapshotter, DumbUploader, EpochSettingsStorer,
FileUploader, LocalUploader, MetricsService, MithrilSignerRegisterer, MultiSigner,
MultiSignerImpl, RemoteUploader, SingleSignatureAuthenticator, SnapshotUploaderType,
Snapshotter, SnapshotterCompressionAlgorithm, VerificationKeyStorer,
MultiSignerImpl, SingleSignatureAuthenticator, SnapshotUploaderType, Snapshotter,
SnapshotterCompressionAlgorithm, VerificationKeyStorer,
};

const SQLITE_FILE: &str = "aggregator.sqlite3";
Expand Down Expand Up @@ -462,13 +462,10 @@ impl DependenciesBuilder {
)
})?;

Ok(Arc::new(RemoteUploader::new(
Box::new(GcpUploader::new(
bucket,
self.configuration.snapshot_use_cdn_domain,
logger.clone(),
)),
logger,
Ok(Arc::new(GcpUploader::new(
bucket,
self.configuration.snapshot_use_cdn_domain,
logger.clone(),
)))
}
SnapshotUploaderType::Local => Ok(Arc::new(LocalUploader::new(
Expand Down
2 changes: 0 additions & 2 deletions mithril-aggregator/src/file_uploaders/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ mod dumb_uploader;
mod gcp_uploader;
mod interface;
mod local_uploader;
mod remote_uploader;

pub use dumb_uploader::*;
pub use gcp_uploader::GcpUploader;
pub use interface::FileLocation;
pub use interface::FileUploader;
pub use local_uploader::LocalUploader;
pub use remote_uploader::RemoteUploader;

#[cfg(test)]
pub use interface::MockFileUploader;
84 changes: 0 additions & 84 deletions mithril-aggregator/src/file_uploaders/remote_uploader.rs

This file was deleted.

2 changes: 1 addition & 1 deletion mithril-aggregator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub use crate::configuration::{
pub use crate::multi_signer::{MultiSigner, MultiSignerImpl};
pub use commands::{CommandType, MainOpts};
pub use dependency_injection::DependencyContainer;
pub use file_uploaders::{DumbUploader, FileUploader, LocalUploader, RemoteUploader};
pub use file_uploaders::{DumbUploader, FileUploader, LocalUploader};
pub use message_adapters::{FromRegisterSignerAdapter, ToCertificatePendingMessageAdapter};
pub use metrics::*;
pub use runtime::{
Expand Down

0 comments on commit d7d93fe

Please sign in to comment.