cache

package
v0.0.0-...-c9de50d Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDebugCache

func GetDebugCache(t controller.PrometheusCacheType) []byte

func NewMetricLabelNameKey

func NewMetricLabelNameKey(metricID, labelNameID int) metricLabelNameKey

Types

type Cache

type Cache struct {
	MetricName              *metricName
	LabelName               *labelName
	LabelValue              *labelValue
	MetricAndAPPLabelLayout *metricAndAPPLabelLayout
	Target                  *target
	Label                   *label
	MetricLabelName         *metricLabelName
	MetricTarget            *metricTarget
	// contains filtered or unexported fields
}

func GetCache

func GetCache(orgID int) (*Cache, error)

func (*Cache) GetORG

func (c *Cache) GetORG() *common.ORG

func (*Cache) Refresh

func (c *Cache) Refresh() (err error)

type LabelKey

type LabelKey struct {
	Name  string
	Value string
}

func NewLabelKey

func NewLabelKey(name, value string) LabelKey

func (LabelKey) String

func (k LabelKey) String() string

type LayoutKey

type LayoutKey struct {
	MetricName string `json:"metric_name"`
	LabelName  string `json:"label_name"`
}

func NewLayoutKey

func NewLayoutKey(metricName, labelName string) LayoutKey

func (LayoutKey) String

func (k LayoutKey) String() string

type MetricTargetKey

type MetricTargetKey struct {
	MetricName string
	TargetID   int
}

func NewMetricTargetKey

func NewMetricTargetKey(metricName string, targetID int) MetricTargetKey

type ORGCaches

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

func GetORGCaches

func GetORGCaches() *ORGCaches

func (*ORGCaches) GetORGIDToCache

func (c *ORGCaches) GetORGIDToCache() cmap.ConcurrentMap[int, *Cache]

func (*ORGCaches) Init

func (c *ORGCaches) Init(ctx context.Context, cfg *prometheuscfg.Config)

func (*ORGCaches) NewCacheAndInitIfNotExist

func (c *ORGCaches) NewCacheAndInitIfNotExist(orgID int) (*Cache, error)

func (*ORGCaches) Start

func (c *ORGCaches) Start(ctx context.Context, cfg *prometheuscfg.Config) error

func (*ORGCaches) Stop

func (c *ORGCaches) Stop()

type TargetKey

type TargetKey struct {
	Instance     string
	Job          string
	VPCID        int
	PodClusterID int
}

func NewTargetKey

func NewTargetKey(instance, job string, vpcID, podClusterID int) TargetKey

Jump to

Keyboard shortcuts

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