mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 07:16:52 +00:00
attempt at documenting table crate
This commit is contained in:
committed by
Alex Auvolat
parent
f871689571
commit
b437610812
+1
-1
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
+2
-2
@@ -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::*;
|
||||
|
||||
@@ -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()),
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user