store

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

Package store is the package that stores the real-time metric, katalyst may support different kinds of store implementations for different scenarios, such monolith im-memory store or distributed im-memory stores.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricStore

type MetricStore interface {
	Name() string

	// Start and Stop are both blocked functions
	Start() error
	Stop() error

	// InsertMetric receives metric data items, and put them into storages;
	// this put action may not be atomic, and it's possible that some items
	// are succeeded, while others are not; if any item is failed to be inserted,
	// an error will be returned.
	InsertMetric(s []*data.MetricSeries) error

	// GetMetric returns the metric data items according to the given
	// metrics references; if sharding is needed, it should be implemented
	// as a specific MetricStore inner logic.
	GetMetric(ctx context.Context, namespace, metricName, objName string, gr *schema.GroupResource,
		objSelector, metricSelector labels.Selector, latest bool) ([]types.Metric, error)
	// ListMetricMeta returns all metrics type bounded with a kubernetes objects if withObject is true
	ListMetricMeta(ctx context.Context, withObject bool) ([]types.MetricMeta, error)
}

MetricStore is a standard metric storage interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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