aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-03-04 14:51:05 +0000
committerAlex <alex@adnab.me>2024-03-04 14:51:05 +0000
commit3168bb34a0082480660e945f7390a5ecab26c665 (patch)
tree2b9d53b65c41f074b772c2123f0a27893e33859a /src/model
parent512933a036be97ab01b8b2627b727d599b962715 (diff)
parentfb55682c66092921f766f82c16eb9e046f1bbb41 (diff)
downloadgarage-3168bb34a0082480660e945f7390a5ecab26c665.tar.gz
garage-3168bb34a0082480660e945f7390a5ecab26c665.zip
Merge pull request 'add request context helper' (#751) from yuka/garage:req-ctx into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/751
Diffstat (limited to 'src/model')
-rw-r--r--src/model/bucket_table.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs
index 4c48a76f..1dbdfac2 100644
--- a/src/model/bucket_table.rs
+++ b/src/model/bucket_table.rs
@@ -191,6 +191,13 @@ impl Bucket {
}
}
+ pub fn present(id: Uuid, params: BucketParams) -> Self {
+ Bucket {
+ id,
+ state: crdt::Deletable::present(params),
+ }
+ }
+
/// Returns true if this represents a deleted bucket
pub fn is_deleted(&self) -> bool {
self.state.is_deleted()