store

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 4 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, limited int) ([]*data.InternalMetric, error)
	// ListMetricMeta returns all metrics type bounded with a kubernetes objects if withObject is true
	ListMetricMeta(ctx context.Context, withObject bool) ([]data.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