local

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(clusters Clusters, workerPool pool.ObjectPool) storage.Storage

NewStorage creates a new local Storage instance.

Types

type AggregatedClusterNamespaceDefinition added in v0.3.0

type AggregatedClusterNamespaceDefinition struct {
	NamespaceID ident.ID
	Session     client.Session
	Retention   time.Duration
	Resolution  time.Duration
}

AggregatedClusterNamespaceDefinition is a definition for a cluster namespace that holds aggregated metrics data at a specific retention and resolution.

func (AggregatedClusterNamespaceDefinition) Validate added in v0.3.0

Validate validates the cluster namespace definition.

type ClusterNamespace added in v0.3.0

type ClusterNamespace interface {
	NamespaceID() ident.ID
	Attributes() storage.Attributes
	Session() client.Session
}

ClusterNamespace is a local storage cluster namespace.

type ClusterStaticConfiguration added in v0.3.0

type ClusterStaticConfiguration struct {
	Namespaces []ClusterStaticNamespaceConfiguration `yaml:"namespaces"`
	Client     client.Configuration                  `yaml:"client"`
	// contains filtered or unexported fields
}

ClusterStaticConfiguration is a static cluster configuration.

type ClusterStaticNamespaceConfiguration added in v0.3.0

type ClusterStaticNamespaceConfiguration struct {
	Namespace          string              `yaml:"namespace"`
	StorageMetricsType storage.MetricsType `yaml:"storageMetricsType"`
	Retention          time.Duration       `yaml:"retention" validate:"nonzero"`
	Resolution         time.Duration       `yaml:"resolution" validate:"min=0"`
}

ClusterStaticNamespaceConfiguration describes the namespaces in a static cluster.

type Clusters added in v0.3.0

type Clusters interface {
	io.Closer

	// ClusterNamespaces returns all known cluster namespaces.
	ClusterNamespaces() []ClusterNamespace

	// UnaggregatedClusterNamespace returns the valid unaggregated
	// cluster namespace.
	UnaggregatedClusterNamespace() ClusterNamespace

	// AggregatedClusterNamespace returns an aggregated cluster namespace
	// at a specific retention and resolution.
	AggregatedClusterNamespace(attrs RetentionResolution) (ClusterNamespace, bool)
}

Clusters is a flattened collection of local storage clusters and namespaces.

func NewClusters added in v0.3.0

func NewClusters(
	unaggregatedClusterNamespace UnaggregatedClusterNamespaceDefinition,
	aggregatedClusterNamespaces ...AggregatedClusterNamespaceDefinition,
) (Clusters, error)

NewClusters instantiates a new Clusters instance.

type ClustersStaticConfiguration added in v0.3.0

type ClustersStaticConfiguration []ClusterStaticConfiguration

ClustersStaticConfiguration is a set of static cluster configurations.

func (ClustersStaticConfiguration) NewClusters added in v0.3.0

NewClusters instantiates a new Clusters instance.

type ClustersStaticConfigurationOptions added in v0.3.0

type ClustersStaticConfigurationOptions struct {
	AsyncSessions bool
}

ClustersStaticConfigurationOptions are options to use when constructing clusters from config.

type RetentionResolution added in v0.3.0

type RetentionResolution struct {
	Retention  time.Duration
	Resolution time.Duration
}

RetentionResolution is a tuple of retention and resolution that describes an aggregated metrics policy.

type UnaggregatedClusterNamespaceDefinition added in v0.3.0

type UnaggregatedClusterNamespaceDefinition struct {
	NamespaceID ident.ID
	Session     client.Session
	Retention   time.Duration
}

UnaggregatedClusterNamespaceDefinition is the definition for the cluster namespace that holds unaggregated metrics data.

func (UnaggregatedClusterNamespaceDefinition) Validate added in v0.3.0

Validate will validate the cluster namespace definition.

Jump to

Keyboard shortcuts

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