storj/pkg/accounting/common.go
Bill Thorp 342dc857f5 rollup query (#1056)
* implemention notes

* more notes

* starting rollup query

* not working yet

* fixed build

* fixed cfg bug

* change context cancelled errs to debugs

* using byte hours for at rest tally

* revert changes to go.mod

* comment fixes

* prevent double recording tallies in rollup

* linting

* stop leaking dbx

* nodeid changes

* fix build
2019-01-16 14:30:33 -05:00

24 lines
1.0 KiB
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package accounting
import "storj.io/storj/pkg/pb"
// Constants for accounting_raw, accounting_rollup, and accounting_timestamps
const (
// AtRest is the data_type representing at-rest data calculated from pointerdb
BandwidthPut = int(pb.PayerBandwidthAllocation_PUT)
BandwidthGet = int(pb.PayerBandwidthAllocation_GET)
BandwidthGetAudit = int(pb.PayerBandwidthAllocation_GET_AUDIT)
BandwidthGetRepair = int(pb.PayerBandwidthAllocation_GET_REPAIR)
BandwidthPutRepair = int(pb.PayerBandwidthAllocation_PUT_REPAIR)
AtRest = int(pb.PayerBandwidthAllocation_PUT_REPAIR + 1)
// LastAtRestTally represents the accounting timestamp for the at-rest data calculation
LastAtRestTally = "LastAtRestTally"
// LastBandwidthTally represents the accounting timestamp for the bandwidth allocation query
LastBandwidthTally = "LastBandwidthTally"
// LastRollup represents the accounting timestamp for rollup calculations
LastRollup = "LastRollup"
)