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>
This commit is contained in:
oneto1 2022-06-30 12:16:18 +00:00 committed by mergify[bot]
parent e5a1f5ea7e
commit 57b50b3170
1 changed files with 4 additions and 3 deletions

View File

@ -9,9 +9,10 @@ import (
// Bucket describes an object store bucket // Bucket describes an object store bucket
type Bucket struct { type Bucket struct {
Bucket string `json:"bucket" url:"bucket"` Bucket string `json:"bucket" url:"bucket"`
Zonegroup string `json:"zonegroup"` NumShards *uint64 `json:"num_shards"`
PlacementRule string `json:"placement_rule"` Zonegroup string `json:"zonegroup"`
PlacementRule string `json:"placement_rule"`
ExplicitPlacement struct { ExplicitPlacement struct {
DataPool string `json:"data_pool"` DataPool string `json:"data_pool"`
DataExtraPool string `json:"data_extra_pool"` DataExtraPool string `json:"data_extra_pool"`