Documentation ¶
Index ¶
- Constants
- func NewLocalMemoryMetricStore(ctx context.Context, baseCtx *katalystbase.GenericContext, ...) (store.MetricStore, error)
- type LocalMemoryMetricStore
- func (l *LocalMemoryMetricStore) GetMetric(_ context.Context, namespace, metricName, objName string, ...) ([]*data.InternalMetric, error)
- func (l *LocalMemoryMetricStore) InsertMetric(seriesList []*data.MetricSeries) error
- func (l *LocalMemoryMetricStore) ListMetricMeta(_ context.Context, withObject bool) ([]data.MetricMeta, error)
- func (l *LocalMemoryMetricStore) Name() string
- func (l *LocalMemoryMetricStore) Serve(mux *http.ServeMux)
- func (l *LocalMemoryMetricStore) Start() error
- func (l *LocalMemoryMetricStore) Stop() error
- type MemoryStoreData
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 ¶
func NewLocalMemoryMetricStore ¶
func NewLocalMemoryMetricStore(ctx context.Context, baseCtx *katalystbase.GenericContext, genericConf *metricconf.GenericMetricConfiguration, storeConf *metricconf.StoreConfiguration) (store.MetricStore, error)
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 { }
Click to show internal directories.
Click to hide internal directories.