Skip to content

Commit 871ebcd

Browse files
committed
Rename AWS S# to plain S3 to provide for S3-compatibles
Signed-off-by: itowlson <[email protected]>
1 parent b22a619 commit 871ebcd

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/blobstore-aws-s3/Cargo.toml renamed to crates/blobstore-s3/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "spin-blobstore-aws-s3"
2+
name = "spin-blobstore-s3"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true

crates/blobstore-aws-s3/src/lib.rs renamed to crates/blobstore-s3/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ use serde::Deserialize;
44
use spin_factor_blobstore::runtime_config::spin::MakeBlobStore;
55
use store::BlobStoreS3;
66

7-
/// A key-value store that uses Azure Cosmos as the backend.
7+
/// A blob store that uses a S3-compatible service as the backend.
8+
/// This currently supports only AWS S3
89
#[derive(Default)]
910
pub struct S3BlobStore {
1011
_priv: (),
1112
}
1213

1314
impl S3BlobStore {
14-
/// Creates a new `AzureBlobStore`.
15+
/// Creates a new `S3BlobStore`.
1516
pub fn new() -> Self {
1617
Self::default()
1718
}
1819
}
1920

20-
/// Runtime configuration for the Azure Cosmos key-value store.
21+
// TODO: allow URL configuration for compatible non-AWS services
22+
23+
/// Runtime configuration for the S3 blob store.
2124
#[derive(Deserialize)]
2225
pub struct S3BlobStoreRuntimeConfig {
2326
/// The access key for the AWS S3 account role.
@@ -31,7 +34,7 @@ pub struct S3BlobStoreRuntimeConfig {
3134
}
3235

3336
impl MakeBlobStore for S3BlobStore {
34-
const RUNTIME_CONFIG_TYPE: &'static str = "aws_s3";
37+
const RUNTIME_CONFIG_TYPE: &'static str = "s3";
3538

3639
type RuntimeConfig = S3BlobStoreRuntimeConfig;
3740

crates/runtime-config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rust-version.workspace = true
1010

1111
[dependencies]
1212
anyhow = { workspace = true }
13-
spin-blobstore-aws-s3 = { path = "../blobstore-aws-s3" }
13+
spin-blobstore-s3 = { path = "../blobstore-s3" }
1414
spin-blobstore-azure = { path = "../blobstore-azure" }
1515
spin-blobstore-memory = { path = "../blobstore-memory" }
1616
spin-common = { path = "../common" }

crates/runtime-config/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub fn blobstore_config_resolver(
470470
.register_store_type(spin_blobstore_azure::AzureBlobStore::new())
471471
.unwrap();
472472
cr
473-
.register_store_type(spin_blobstore_aws_s3::S3BlobStore::new())
473+
.register_store_type(spin_blobstore_s3::S3BlobStore::new())
474474
.unwrap();
475475

476476
cr

0 commit comments

Comments
 (0)