Documentation ¶
Index ¶
- Variables
- type Config
- type Observer
- func (observer *Observer) InlineSegment(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
- func (observer *Observer) Object(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
- func (observer *Observer) RemoteSegment(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
- type Service
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 Observer ¶ added in v0.23.0
type Observer struct { Now time.Time Log *zap.Logger Node map[storj.NodeID]float64 Bucket map[metabase.BucketLocation]*accounting.BucketTally }
Observer observes metainfo and adds up tallies for nodes and buckets.
func NewObserver ¶ added in v0.23.0
NewObserver returns an metainfo loop observer that adds up totals for buckets and nodes. The now argument controls when the observer considers pointers to be expired.
func (*Observer) InlineSegment ¶ added in v0.23.0
func (observer *Observer) InlineSegment(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
InlineSegment is called for each inline segment.
func (*Observer) Object ¶ added in v0.23.0
func (observer *Observer) Object(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
Object is called for each object once.
func (*Observer) RemoteSegment ¶ added in v0.23.0
func (observer *Observer) RemoteSegment(ctx context.Context, location metabase.SegmentLocation, pointer *pb.Pointer) (err error)
RemoteSegment is called for each remote segment.
type Service ¶
Service is the tally service for data stored on each storage node
architecture: Chore
func New ¶
func New(log *zap.Logger, sdb accounting.StoragenodeAccounting, pdb accounting.ProjectAccounting, liveAccounting accounting.Cache, metainfoLoop *metainfo.Loop, interval time.Duration) *Service
New creates a new tally Service.
Click to show internal directories.
Click to hide internal directories.