validators

package
v2.10.0+incompatible Latest Latest
Warning

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

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

Documentation

Overview

Package validators contains settings validators.

Index

Constants

View Source
const (
	// MetricsResolutionMin is the smallest value metric resolution can accept.
	MetricsResolutionMin = time.Second
	// MetricsResolutionMultipleOf is value metrics resolution should be multiple of.
	MetricsResolutionMultipleOf = time.Second
	// DataRetentionMin is the smallest value data retention can accept.
	DataRetentionMin = 24 * time.Hour
	// DataRetentionMultipleOf is a value of data retention should be multiple of.
	DataRetentionMultipleOf = 24 * time.Hour
)

Variables

This section is empty.

Functions

func ValidateAWSPartitions

func ValidateAWSPartitions(partitions []string) error

ValidateAWSPartitions validates AWS partitions list.

func ValidateDataRetention

func ValidateDataRetention(value time.Duration) (time.Duration, error)

ValidateDataRetention validate metric resolution.

func ValidateMetricResolution

func ValidateMetricResolution(value time.Duration) (time.Duration, error)

ValidateMetricResolution validate metric resolution.

Types

type DurationNotAllowedError

type DurationNotAllowedError struct {
	Msg string
}

DurationNotAllowedError duration not allowed error.

func (DurationNotAllowedError) Error

func (e DurationNotAllowedError) Error() string

type MinDurationError

type MinDurationError struct {
	Msg string
	Min time.Duration
}

MinDurationError minimum allowed duration error.

func (MinDurationError) Error

func (e MinDurationError) Error() string

Jump to

Keyboard shortcuts

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