From 57b50b3170ee3c81a66b0101e032e4eb9fcb4a0e Mon Sep 17 00:00:00 2001 From: oneto1 <644739768@qq.com> Date: Thu, 30 Jun 2022 12:16:18 +0000 Subject: [PATCH] rgw/admin: add num_shards to bucket struct field and format code This change add a new bucket struct field, so we can use rgw.admin.API.GetBucketInfo() to get a bucket's num_shards. Format bucket.go. Signed-off-by: oneto1 <644739768@qq.com> --- rgw/admin/bucket.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rgw/admin/bucket.go b/rgw/admin/bucket.go index f8125d8..3fe596c 100644 --- a/rgw/admin/bucket.go +++ b/rgw/admin/bucket.go @@ -9,9 +9,10 @@ import ( // Bucket describes an object store bucket type Bucket struct { - Bucket string `json:"bucket" url:"bucket"` - Zonegroup string `json:"zonegroup"` - PlacementRule string `json:"placement_rule"` + Bucket string `json:"bucket" url:"bucket"` + NumShards *uint64 `json:"num_shards"` + Zonegroup string `json:"zonegroup"` + PlacementRule string `json:"placement_rule"` ExplicitPlacement struct { DataPool string `json:"data_pool"` DataExtraPool string `json:"data_extra_pool"`