local

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServingListPath = "/store/list"
	ServingGetPath  = "/store/get"
	ServingSetPath  = "/store/set"
)
View Source
const (
	StoreGETParamNamespace       = "namespace"
	StoreGETParamMetricName      = "metricName"
	StoreGETParamMetricSelector  = "metricSelector"
	StoreGETParamObjectGR        = "objGR"
	StoreGETParamObjectName      = "objName"
	StoreGETParamMObjectSelector = "objSelector"
	StoreGETParamLimited         = "limited"
)
View Source
const MetricStoreNameLocalMemory = "local-memory-store"
View Source
const (
	StoreListParamObjected = "objected"
)

Variables

This section is empty.

Functions

Types

type LocalMemoryMetricStore

type LocalMemoryMetricStore struct {
	// contains filtered or unexported fields
}

LocalMemoryMetricStore implements MetricStore with single-node versioned in-memory storage, and it will be used as a default implementation, especially when the amount of internalMetric or the size of cluster is small. todo: this implementation may be not efficient noe, so we may need to use more complicated structures in the future, such as indexer/aggregator/sort or so on.

func (*LocalMemoryMetricStore) GetMetric

func (l *LocalMemoryMetricStore) GetMetric(_ context.Context, namespace, metricName, objName string, gr *schema.GroupResource,
	objSelector, metricSelector labels.Selector, limited int) ([]*data.InternalMetric, error)

func (*LocalMemoryMetricStore) InsertMetric

func (l *LocalMemoryMetricStore) InsertMetric(seriesList []*data.MetricSeries) error

func (*LocalMemoryMetricStore) ListMetricMeta

func (l *LocalMemoryMetricStore) ListMetricMeta(_ context.Context, withObject bool) ([]data.MetricMeta, error)

func (*LocalMemoryMetricStore) Name

func (l *LocalMemoryMetricStore) Name() string

func (*LocalMemoryMetricStore) Serve

func (l *LocalMemoryMetricStore) Serve(mux *http.ServeMux)

Serve todo: support to use gzip to reduce the transported data through http

func (*LocalMemoryMetricStore) Start

func (l *LocalMemoryMetricStore) Start() error

func (*LocalMemoryMetricStore) Stop

func (l *LocalMemoryMetricStore) Stop() error

type MemoryStoreData

type MemoryStoreData struct {
}

Jump to

Keyboard shortcuts

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