Skip to content

Commit

Permalink
Merge host component key value implementations into new factor crates
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Schoepp <[email protected]>
  • Loading branch information
calebschoepp committed Sep 3, 2024
1 parent 8fda052 commit 1c1f8b0
Show file tree
Hide file tree
Showing 29 changed files with 508 additions and 748 deletions.
80 changes: 20 additions & 60 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ spin-common = { path = "crates/common" }
spin-doctor = { path = "crates/doctor" }
spin-expressions = { path = "crates/expressions" }
spin-http = { path = "crates/http" }
spin-key-value = { path = "crates/key-value" }
spin-key-value-sqlite = { path = "crates/key-value-sqlite" }
spin-loader = { path = "crates/loader" }
spin-locked-app = { path = "crates/locked-app" }
spin-manifest = { path = "crates/manifest" }
Expand Down
19 changes: 0 additions & 19 deletions crates/factor-key-value-azure/Cargo.toml

This file was deleted.

58 changes: 0 additions & 58 deletions crates/factor-key-value-azure/src/lib.rs

This file was deleted.

15 changes: 0 additions & 15 deletions crates/factor-key-value-redis/Cargo.toml

This file was deleted.

38 changes: 0 additions & 38 deletions crates/factor-key-value-redis/src/lib.rs

This file was deleted.

15 changes: 0 additions & 15 deletions crates/factor-key-value-spin/Cargo.toml

This file was deleted.

12 changes: 8 additions & 4 deletions crates/factor-key-value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ edition = { workspace = true }

[dependencies]
anyhow = "1.0"
lru = "0.9.0"
serde = { version = "1.0", features = ["rc"] }
spin-core = { path = "../core" }
spin-factors = { path = "../factors" }
# TODO: merge with this crate
spin-key-value = { path = "../key-value" }
spin-locked-app = { path = "../locked-app" }
spin-world = { path = "../world" }
table = { path = "../table" }
tokio = { version = "1", features = ["macros", "sync", "rt"] }
toml = "0.8"
tracing = { workspace = true }

[dev-dependencies]
spin-factor-key-value-redis = { path = "../factor-key-value-redis" }
spin-factor-key-value-spin = { path = "../factor-key-value-spin" }
spin-key-value-redis = { path = "../key-value-redis" }
spin-key-value-spin = { path = "../key-value-spin" }
spin-factors-test = { path = "../factors-test" }
tempfile = "3.12.0"
tokio = { version = "1", features = ["macros", "rt"] }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
use crate::util::EmptyStoreManager;
use anyhow::{Context, Result};
use spin_app::MetadataKey;
use spin_core::{async_trait, wasmtime::component::Resource};
use spin_locked_app::MetadataKey;
use spin_world::v2::key_value;
use std::{collections::HashSet, sync::Arc};
use table::Table;

// TODO(factors): Code left for reference; remove after migration to factors
// mod host_component;
mod util;

pub use util::{
CachingStoreManager, DefaultManagerGetter, DelegatingStoreManager, EmptyStoreManager,
};

pub const KEY_VALUE_STORES_KEY: MetadataKey<Vec<String>> = MetadataKey::new("key_value_stores");

const DEFAULT_STORE_TABLE_CAPACITY: u32 = 256;
Expand Down
Loading

0 comments on commit 1c1f8b0

Please sign in to comment.