util

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVRFromGVK

func GVRFromGVK(groupVersionKind schema.GroupVersionKind, mapper meta.ResettableRESTMapper) (schema.GroupVersionResource, error)

func IsNamespaced

func IsNamespaced(groupVersionKind schema.GroupVersionKind, mapper meta.ResettableRESTMapper) (namespaced bool, err error)

func ResourceHumanID

func ResourceHumanID(name, namespace string, groupVersionKind schema.GroupVersionKind, mapper meta.ResettableRESTMapper) (string, error)

func ResourceID

func ResourceID(name, namespace string, groupVersionKind schema.GroupVersionKind) string

Types

type Concurrent

type Concurrent[T any] struct {
	// contains filtered or unexported fields
}

func NewConcurrent

func NewConcurrent[T any](obj T) *Concurrent[T]

func NewConcurrentWithLock

func NewConcurrentWithLock[T any](obj T, lock *sync.RWMutex) *Concurrent[T]

func (*Concurrent[T]) RTransaction

func (c *Concurrent[T]) RTransaction(f func(object T))

func (*Concurrent[T]) RWTransaction

func (c *Concurrent[T]) RWTransaction(f func(object T))

Jump to

Keyboard shortcuts

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