util

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmptyString = ""
)

Variables

This section is empty.

Functions

func GetMessageAPIVerison

func GetMessageAPIVerison(msg *beehiveModel.Message) string

GetMessageUID returns the UID of the object in message

func GetMessageResourceType

func GetMessageResourceType(msg *beehiveModel.Message) string

GetMessageUID returns the UID of the object in message

func SetMetaType

func SetMetaType(obj runtime.Object) error

MetaType is generally consisted of apiversion, kind like: { apiVersion: apps/v1 kind: Deployments } TODO: support crd

func UnsafeKindToResource

func UnsafeKindToResource(k string) string

func UnsafeResourceToKind

func UnsafeResourceToKind(r string) string

Sometimes, we need guess kind according to resource: 1. In most cases, is like pods to Pod, 2. In some unusual cases, requires special treatment like endpoints to Endpoints

func UnstructuredAttr

func UnstructuredAttr(obj runtime.Object) (labels.Set, fields.Set, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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