cache

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecretKey tracks Secret resource references
	SecretKey = "sec"

	// ClusterRoleKey tracks ClusterRole resource references
	ClusterRoleKey = "clusterrole"

	// ConfigMapKey tracks ConfigMap resource references
	ConfigMapKey = "cm"
)
View Source
const ClusterKey = "cl"

ClusterKey tracks Cluster resource references

View Source
const IngressKey = "ing"

IngressKey tracks Ingress resource references

View Source
const RoleKey = "role"

RoleKey represents a role identifier.

Variables

This section is empty.

Functions

func FQN

func FQN(ns, n string) string

FQN returns a fully qualified resource identifier.

func ListAvailableMetrics added in v0.20.0

func ListAvailableMetrics(db *db.DB) (v1.ResourceList, error)

ListAvailableMetrics return the total cluster available cpu/mem.

func MatchLabels added in v0.20.0

func MatchLabels(labels, sel map[string]string) bool

MatchLabels check if pod labels match a selector.

func MetaFQN

func MetaFQN(m metav1.ObjectMeta) string

MetaFQN returns a fully qualified resource identifier based on object meta.

func ResFqn

func ResFqn(k, s string) string

ResFqn returns a resource specific fqn.

Types

type Cluster added in v0.4.0

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

Cluster represents Cluster cache.

func NewCluster added in v0.4.0

func NewCluster(v *semver.Version) *Cluster

NewCluster returns a new Cluster cache.

func (*Cluster) ListVersion added in v0.4.0

func (c *Cluster) ListVersion() (*semver.Version, error)

ListVersion returns cluster server version.

type ClusterRoleBinding

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

ClusterRoleBinding represents ClusterRoleBinding cache.

func NewClusterRoleBinding

func NewClusterRoleBinding(db *db.DB) *ClusterRoleBinding

NewClusterRoleBinding returns a new ClusterRoleBinding cache.

func (*ClusterRoleBinding) ClusterRoleRefs added in v0.6.0

func (c *ClusterRoleBinding) ClusterRoleRefs(refs *sync.Map)

ClusterRoleRefs computes all clusterrole external references.

type Ingress added in v0.4.0

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

Ingress represents Ingress cache.

func NewIngress added in v0.4.0

func NewIngress(db *db.DB) *Ingress

NewIngress returns a new Ingress cache.

func (*Ingress) IngressRefs added in v0.5.0

func (d *Ingress) IngressRefs(refs *sync.Map) error

IngressRefs computes all ingress external references.

type Pod

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

Pod represents a Pod cache.

func NewPod

func NewPod(dba *db.DB) *Pod

NewPod returns a Pod cache.

func (*Pod) PodRefs

func (p *Pod) PodRefs(refs *sync.Map) error

PodRefs computes all pods external references.

type RoleBinding

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

RoleBinding represents RoleBinding cache.

func NewRoleBinding

func NewRoleBinding(db *db.DB) *RoleBinding

NewRoleBinding returns a new RoleBinding cache.

func (*RoleBinding) RoleRefs added in v0.6.0

func (r *RoleBinding) RoleRefs(refs *sync.Map)

RoleRefs computes all role external references.

type ServiceAccount

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

ServiceAccount tracks serviceaccounts.

func NewServiceAccount

func NewServiceAccount(db *db.DB) *ServiceAccount

NewServiceAccount returns a new serviceaccount loader.

func (*ServiceAccount) ServiceAccountRefs

func (s *ServiceAccount) ServiceAccountRefs(refs *sync.Map) error

ServiceAccountRefs computes all serviceaccount external references.

Jump to

Keyboard shortcuts

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