live

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package live provides live accounting functionality. That is, it keeps track of deltas in the amount of storage used by each project relative to the last tally operation (see pkg/accounting/tally).

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error is the default error class for live-accounting.
	Error = errs.Class("live-accounting")
)

Functions

func NewCache added in v0.24.0

func NewCache(log *zap.Logger, config Config) (accounting.Cache, error)

NewCache creates a new accounting.Cache instance using the type specified backend in the provided config.

Types

type Config

type Config struct {
	StorageBackend    string        `help:"what to use for storing real-time accounting data"`
	BandwidthCacheTTL time.Duration `default:"5m" help:"bandwidth cache key time to live"`
}

Config contains configurable values for the live accounting service.

Jump to

Keyboard shortcuts

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