storagemetadata

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateMetricsType

func ValidateMetricsType(v MetricsType) error

ValidateMetricsType validates a stored metrics type.

Types

type Attributes

type Attributes struct {
	// MetricsType indicates the type of namespace this metric originated from.
	MetricsType MetricsType
	// Retention indicates the retention of the namespace this metric originated
	// from.
	Retention time.Duration
	// Resolution indicates the retention of the namespace this metric originated
	// from.
	Resolution time.Duration
}

Attributes is a set of stored metrics attributes.

func (Attributes) CombinedWith added in v1.4.2

func (a Attributes) CombinedWith(other Attributes) Attributes

CombinedWith returns these Attributes combined with other Attributes.

func (Attributes) String added in v1.0.1

func (a Attributes) String() string

String returns a string detailing the attributes.

func (Attributes) Validate

func (a Attributes) Validate() error

Validate validates a storage attributes.

type MetricsType

type MetricsType uint

MetricsType is a type of stored metrics.

const (
	// UnknownMetricsType is the unknown metrics type and is invalid.
	UnknownMetricsType MetricsType = iota
	// UnaggregatedMetricsType is an unaggregated metrics type.
	UnaggregatedMetricsType
	// AggregatedMetricsType is an aggregated metrics type.
	AggregatedMetricsType

	// DefaultMetricsType is the default metrics type value.
	DefaultMetricsType = UnaggregatedMetricsType
)

func ParseMetricsType

func ParseMetricsType(str string) (MetricsType, error)

ParseMetricsType parses a metric type.

func (MetricsType) String

func (t MetricsType) String() string

func (*MetricsType) UnmarshalYAML

func (t *MetricsType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals a stored merics type.

Jump to

Keyboard shortcuts

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