storj/satellite/accounting/bucketusage.go
Michał Niewrzał 27a714e8b0 satellite/accounting/tally: use objects iterator instead metaloop
Bucket tally calculation will be removed from metaloop and will
use metabase objects iterator directly.

At the moment only bucket tally needs objects so it make no sense
to implement separate objects loop.

Change-Id: Iee60059fc8b9a1bf64d01cafe9659b69b0e27eb1
2021-07-20 15:52:18 +00:00

30 lines
498 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package accounting
import (
"time"
"storj.io/common/uuid"
)
// BucketStorageTally holds data about a bucket tally.
type BucketStorageTally struct {
BucketName string
ProjectID uuid.UUID
IntervalStart time.Time
ObjectCount int64
TotalSegmentCount int64
TotalBytes int64
MetadataSize int64
}
// Bytes returns total bytes.
func (s *BucketStorageTally) Bytes() int64 {
return s.TotalBytes
}