resourcelist

package
v1.24.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentKey = "environment"
	TenantKey      = "tenant"
	ProjectKey     = "project"
)
View Source
const (
	Deployment  = "Deployment"
	StatefulSet = "StatefulSet"
	DaemonSet   = "DaemonSet"

	NamespaceKey    = "namespace"
	WorkloadTypeKey = "owner_kind"
	WorkloadNameKey = "workload"
	PodKey          = "pod"
	ContainerKey    = "container"
)

Variables

This section is empty.

Functions

func GetUniqueContainerKey

func GetUniqueContainerKey(sample *promemodel.Sample) (string, error)

通过 namespace, pod, container 生成唯一Key

func GetUniqueEnvironmentKey

func GetUniqueEnvironmentKey(sample *promemodel.Sample) (key string, valid bool)

func GetUniqueWorkloadKey

func GetUniqueWorkloadKey(sample *promemodel.Sample) (string, error)

通过 namespace, owner_kind, workload 生成唯一Key

Types

type ResourceCache

type ResourceCache struct {
	DB     *database.Database
	Agents *agents.ClientSet
}

func NewResourceCache

func NewResourceCache(db *database.Database, agents *agents.ClientSet) *ResourceCache

func (*ResourceCache) EnvironmentSync

func (c *ResourceCache) EnvironmentSync() error

func (*ResourceCache) Start

func (c *ResourceCache) Start()

func (*ResourceCache) WorkloadSync

func (c *ResourceCache) WorkloadSync() error

Jump to

Keyboard shortcuts

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