helpers

package
v0.0.0-...-ed75ec7 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AllResourcesCacheKeyFormat = "%s-%s-allResourcesCache"
View Source
const IsMetricServerAvailableCacheKeyFormat = "%s-%s-isMetricServerAvailableCache"

Variables

This section is empty.

Functions

func AddTypeInformationToObject

func AddTypeInformationToObject(obj runtime.Object) error

func CacheAllResources

func CacheAllResources(container container.Container, config, cluster string) error

func CacheIfIsMetricsAPIAvailable

func CacheIfIsMetricsAPIAvailable(container container.Container, config string, cluster string) bool

func RefreshAllResourcesCache

func RefreshAllResourcesCache(container container.Container, config, cluster string) error

func StripUnusedFields

func StripUnusedFields(obj interface{}) (interface{}, error)

Types

type Resources

type Resources struct {
	Namespaced bool   `json:"namespaced"`
	Name       string `json:"name"`
	Kind       string `json:"kind"`
}

func FindResourceByKind

func FindResourceByKind(container container.Container, config, cluster, kind string) (Resources, bool)

func GetAllResourcesFromCache

func GetAllResourcesFromCache(container container.Container, config, cluster string) ([]Resources, error)

Jump to

Keyboard shortcuts

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