Documentation
¶
Index ¶
- func IndexCheck(length int, indexes ...*int)
- func KeyFunc(obj runtime.Object) string
- func KeyFuncObj(obj runtime.Object) (string, error)
- func KeyFuncReq(ctx context.Context, _ string) (string, error)
- func KeyRootFunc(ctx context.Context) string
- func ParseKey(key string) (gvr schema.GroupVersionResource, namespace string, name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyFuncObj ¶
KeyFuncObj generated key from obj
func KeyFuncReq ¶
KeyFuncReq generate key from req context
func KeyRootFunc ¶
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.
Click to show internal directories.
Click to hide internal directories.