diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-03-26 19:41:46 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-04-27 16:37:10 +0200 |
commit | b4376108122bb09bd8cff562b718967d4332ffbe (patch) | |
tree | 120910caa43e400c0431463f47ed3fc114af77ea /src/model | |
parent | f8716895715b1a552750062aca9bc1882f6f95c0 (diff) | |
download | garage-b4376108122bb09bd8cff562b718967d4332ffbe.tar.gz garage-b4376108122bb09bd8cff562b718967d4332ffbe.zip |
attempt at documenting table crate
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/block.rs | 2 | ||||
-rw-r--r-- | src/model/bucket_table.rs | 4 | ||||
-rw-r--r-- | src/model/garage.rs | 4 | ||||
-rw-r--r-- | src/model/key_table.rs | 4 | ||||
-rw-r--r-- | src/model/object_table.rs | 2 | ||||
-rw-r--r-- | src/model/version_table.rs | 2 |
6 files changed, 13 insertions, 5 deletions
diff --git a/src/model/block.rs b/src/model/block.rs index 0d9af38f..2b145615 100644 --- a/src/model/block.rs +++ b/src/model/block.rs @@ -18,7 +18,7 @@ use garage_rpc::membership::System; use garage_rpc::rpc_client::*; use garage_rpc::rpc_server::*; -use garage_table::replication::{sharded::TableShardedReplication, TableReplication}; +use garage_table::replication::{TableReplication, TableShardedReplication}; use crate::block_ref_table::*; diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs index 6330dced..2ede4904 100644 --- a/src/model/bucket_table.rs +++ b/src/model/bucket_table.rs @@ -100,6 +100,10 @@ impl TableSchema for BucketTable { type E = Bucket; type Filter = DeletedFilter; + fn updated(&self, _old: Option<Self::E>, _new: Option<Self::E>) { + // nothing to do when updated + } + fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool { filter.apply(entry.is_deleted()) } diff --git a/src/model/garage.rs b/src/model/garage.rs index 5f7a67c9..3f51f9fe 100644 --- a/src/model/garage.rs +++ b/src/model/garage.rs @@ -7,8 +7,8 @@ use garage_rpc::membership::System; use garage_rpc::rpc_client::RpcHttpClient; use garage_rpc::rpc_server::RpcServer; -use garage_table::replication::fullcopy::*; -use garage_table::replication::sharded::*; +use garage_table::replication::TableFullReplication; +use garage_table::replication::TableShardedReplication; use garage_table::*; use crate::block::*; diff --git a/src/model/key_table.rs b/src/model/key_table.rs index fcca3835..e6ebe8de 100644 --- a/src/model/key_table.rs +++ b/src/model/key_table.rs @@ -113,6 +113,10 @@ impl TableSchema for KeyTable { type E = Key; type Filter = KeyFilter; + fn updated(&self, _old: Option<Self::E>, _new: Option<Self::E>) { + // nothing to do when updated + } + fn matches_filter(entry: &Self::E, filter: &Self::Filter) -> bool { match filter { KeyFilter::Deleted(df) => df.apply(entry.deleted.get()), diff --git a/src/model/object_table.rs b/src/model/object_table.rs index 34ac798a..d5be62e5 100644 --- a/src/model/object_table.rs +++ b/src/model/object_table.rs @@ -6,7 +6,7 @@ use garage_util::background::BackgroundRunner; use garage_util::data::*; use garage_table::crdt::*; -use garage_table::replication::sharded::*; +use garage_table::replication::TableShardedReplication; use garage_table::*; use crate::version_table::*; diff --git a/src/model/version_table.rs b/src/model/version_table.rs index 841fbfea..fabd1fb1 100644 --- a/src/model/version_table.rs +++ b/src/model/version_table.rs @@ -5,7 +5,7 @@ use garage_util::background::BackgroundRunner; use garage_util::data::*; use garage_table::crdt::*; -use garage_table::replication::sharded::*; +use garage_table::replication::TableShardedReplication; use garage_table::*; use crate::block_ref_table::*; |