agg

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Deleted        = "deleted"
	StorageAccount = "storage_account"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationGroup

type AggregationGroup struct {
	Labels  Labels
	Deleted bool
}

type AggregationResult

type AggregationResult struct {
	AggregationGroup AggregationGroup
	StorageUsage     du.StorageUsage
}

type AggregationRule

type AggregationRule struct {
	// The named groups are used as labels
	Pattern ReGroup `yaml:"pattern"`
	// A label not found as named group is looked up in this
	StaticLabels map[string]string `yaml:"labels"`
}

type Aggregator

type Aggregator struct {
	// contains filtered or unexported fields
}

func NewAggregator

func NewAggregator(duReader du.Reader, labelsWithDefaults Labels, rules []AggregationRule) (*Aggregator, error)

func (*Aggregator) Aggregate

func (a *Aggregator) Aggregate(previousRunDate time.Time) (aggregationResults []AggregationResult, runDate time.Time, err error)

func (*Aggregator) GetLabelNames

func (a *Aggregator) GetLabelNames() []string

func (*Aggregator) GetStorageAccountName added in v0.1.3

func (a *Aggregator) GetStorageAccountName() string

type Labels

type Labels = map[string]string

type ReGroup

type ReGroup struct {
	*regroup.ReGroup
	// contains filtered or unexported fields
}

ReGroup wraps regroup.ReGroup to add YAML marshalling from and to a (regex) string

func NewReGroup

func NewReGroup(original string) ReGroup

func (ReGroup) MarshalYAML

func (r ReGroup) MarshalYAML() (interface{}, error)

func (*ReGroup) UnmarshalYAML

func (r *ReGroup) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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