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 ¶
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
Click to show internal directories.
Click to hide internal directories.