Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Error = errs.Class("tally error")
)
Error is a standard error class for this package.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Interval time.Duration `help:"how frequently the tally service should run" releaseDefault:"1h" devDefault:"30s"`
}
Config contains configurable values for the tally service
type Service ¶
Service is the tally service for data stored on each storage node
architecture: Chore
func New ¶
func New(logger *zap.Logger, sdb accounting.StoragenodeAccounting, pdb accounting.ProjectAccounting, liveAccounting live.Service, metainfo *metainfo.Service, overlay *overlay.Service, interval time.Duration) *Service
New creates a new tally Service
func (*Service) CalculateAtRestData ¶
func (t *Service) CalculateAtRestData(ctx context.Context) (latestTally time.Time, nodeData map[storj.NodeID]float64, bucketTallies map[string]*accounting.BucketTally, err error)
CalculateAtRestData iterates through the pieces on metainfo and calculates the amount of at-rest data stored in each bucket and on each respective node
Click to show internal directories.
Click to hide internal directories.