aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorYureka <yuka@yuka.dev>2024-03-03 14:56:52 +0100
committerYureka <yuka@yuka.dev>2024-03-04 13:26:39 +0100
commitfb55682c66092921f766f82c16eb9e046f1bbb41 (patch)
tree744ae13518aa4e3f8cc572fb5c94a2bc19941818 /src/model
parent32d6b4def8d14d77727be9af640b1626d5153c75 (diff)
downloadgarage-fb55682c66092921f766f82c16eb9e046f1bbb41.tar.gz
garage-fb55682c66092921f766f82c16eb9e046f1bbb41.zip
add request context helper
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()