metaserver

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexCheck

func IndexCheck(length int, indexes ...*int)

force set index to 0 if out of range

func KeyFunc

func KeyFunc(obj runtime.Object) string

func KeyFuncObj

func KeyFuncObj(obj runtime.Object) (string, error)

KeyFuncObj generated key from obj

func KeyFuncReq

func KeyFuncReq(ctx context.Context, _ string) (string, error)

KeyFuncReq generate key from req context

func KeyRootFunc

func KeyRootFunc(ctx context.Context) string

func ParseKey

func ParseKey(key string) (gvr schema.GroupVersionResource, namespace string, name string)

ParseKey parse key to group/version/resource, namespace, name Now key format is like below: 0/1 /2 /3 /4 /5

/core/v1/pods/{namespaces}/{name}

0/1 /2/3

/app/v1/deployments

0/1 /2 /3

/core/v1/endpoints

Remember that ParseKey is not responsible for verifying the validity of the content, for example, gvr in key /app/v1111/endpoint will be parsed as {Group:"app", Version:"v1111", Resource:"endpoint"}

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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