storagemetadata

package
v0.15.17-hotfix.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 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) 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