remote

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const MetricStoreNameRemoteMemory = "remote-memory-store"

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteMemoryMetricStore

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

RemoteMemoryMetricStore implements MetricStore with multiple-nodes versioned in-memory storage, and each shard will be responsible for some splits of the total metrics. it will be used when the cluster becomes too large.

RemoteMemoryMetricStore itself will be responsible for shard-splitting logic, and it should be a wrapper of LocalMemoryMetricStore to reuse its internalMetric structure.

func (*RemoteMemoryMetricStore) GetMetric

func (r *RemoteMemoryMetricStore) GetMetric(_ context.Context, namespace, metricName, objName string, gr *schema.GroupResource,
	objSelector, metricSelector labels.Selector, latest bool,
) ([]types.Metric, error)

func (*RemoteMemoryMetricStore) InsertMetric

func (r *RemoteMemoryMetricStore) InsertMetric(seriesList []*data.MetricSeries) error

func (*RemoteMemoryMetricStore) ListMetricMeta

func (r *RemoteMemoryMetricStore) ListMetricMeta(ctx context.Context, withObject bool) ([]types.MetricMeta, error)

func (*RemoteMemoryMetricStore) Name

func (r *RemoteMemoryMetricStore) Name() string

func (*RemoteMemoryMetricStore) Start

func (r *RemoteMemoryMetricStore) Start() error

func (*RemoteMemoryMetricStore) Stop

func (r *RemoteMemoryMetricStore) Stop() error

type ShardingController

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

ShardingController is responsible to separate the metric store into several sharding pieces to tolerant single node failure, as well as avoiding memory pressure in single node.

todo: currently, it not really a valid

func NewShardingController

func NewShardingController(ctx context.Context, baseCtx *katalystbase.GenericContext,
	storeConf *metricconf.StoreConfiguration,
) (*ShardingController, error)

func (*ShardingController) GetRWCount

func (s *ShardingController) GetRWCount() (int, int)

GetRWCount returns the quorum read/write counts

func (*ShardingController) GetRequests

func (s *ShardingController) GetRequests(ctx context.Context, path string) ([]*http.Request, error)

GetRequests returns the pre-generated http requests

func (*ShardingController) Start

func (s *ShardingController) Start() error

func (*ShardingController) Stop

func (s *ShardingController) Stop() error

Jump to

Keyboard shortcuts

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