storageusage

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// Store stores storage usage stamps to db replacing conflicting entries
	Store(ctx context.Context, stamps []Stamp) error
	// GetDaily returns daily storage usage stamps for particular satellite
	// for provided time range
	GetDaily(ctx context.Context, satelliteID storj.NodeID, from, to time.Time) ([]Stamp, error)
	// GetDailyTotal returns daily storage usage stamps summed across all known satellites
	// for provided time range
	GetDailyTotal(ctx context.Context, from, to time.Time) ([]Stamp, error)
}

DB works with storage usage database

type Stamp

type Stamp struct {
	SatelliteID storj.NodeID `json:"-"`

	AtRestTotal float64 `json:"atRestTotal"`

	Timestamp time.Time `json:"timestamp"`
}

Stamp is storage usage stamp for satellite at some point in time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL