utils

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTargetUID

func GetTargetUID(target string) string

func IsAppPod

func IsAppPod(pod *corev1.Pod) bool

func IsAppPodShouldList

func IsAppPodShouldList(ctx context.Context, client client.Client, pod *corev1.Pod) bool

func IsCsiNode

func IsCsiNode(pod *corev1.Pod) bool

func IsJuiceCustSecret

func IsJuiceCustSecret(secret *corev1.Secret) bool

func IsJuiceSecret

func IsJuiceSecret(secret *corev1.Secret) bool

func IsSysPod

func IsSysPod(pod *corev1.Pod) bool

func IsUpgradeJob

func IsUpgradeJob(job *batchv1.Job) bool

func LabelSelectorOfMount

func LabelSelectorOfMount(pv corev1.PersistentVolume) labels.Selector

Types

type LogPipe

type LogPipe struct {
	// contains filtered or unexported fields
}

func NewLogPipe

func NewLogPipe(ctx context.Context, conn *websocket.Conn, stream io.ReadCloser) *LogPipe

func (*LogPipe) Read

func (l *LogPipe) Read(p []byte) (int, error)

func (*LogPipe) Write

func (l *LogPipe) Write(p []byte) (int, error)

type TimeOrderedIndexes

type TimeOrderedIndexes[T k8sResource] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTimeIndexes

func NewTimeIndexes[T k8sResource]() *TimeOrderedIndexes[T]

func (*TimeOrderedIndexes[T]) AddIndex

func (i *TimeOrderedIndexes[T]) AddIndex(resource *T, metaGetter func(*T) metav1.ObjectMeta, resourceGetter func(types.NamespacedName) (*T, error))

func (*TimeOrderedIndexes[T]) Debug

func (i *TimeOrderedIndexes[T]) Debug() []types.NamespacedName

func (*TimeOrderedIndexes[T]) Iterate

func (i *TimeOrderedIndexes[T]) Iterate(ctx context.Context, descend bool) <-chan types.NamespacedName

func (*TimeOrderedIndexes[T]) Length

func (i *TimeOrderedIndexes[T]) Length() int

func (*TimeOrderedIndexes[T]) RemoveIndex

func (i *TimeOrderedIndexes[T]) RemoveIndex(name types.NamespacedName)

Jump to

Keyboard shortcuts

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