Documentation ¶
Index ¶
- Variables
- type Config
- type Service
- func (t *Service) CalculateAtRestData(ctx context.Context) (latestTally time.Time, nodeData map[storj.NodeID]float64, ...)
- func (t *Service) Run(ctx context.Context) (err error)
- func (t *Service) SaveAtRestRaw(ctx context.Context, latestTally time.Time, created time.Time, ...) error
- func (t *Service) Tally(ctx context.Context) error
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" default:"1h" devDefault:"30s"`
}
Config contains configurable values for the tally service
type Service ¶ added in v0.9.0
type Service struct {
// contains filtered or unexported fields
}
Service is the tally service for data stored on each storage node
func New ¶
func New(logger *zap.Logger, accountingDB accounting.DB, pointerdb *pointerdb.Service, overlay *overlay.Cache, limit int, interval time.Duration) *Service
New creates a new tally Service
func (*Service) CalculateAtRestData ¶ added in v0.9.0
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 pointerdb 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.