util

package
v1.0.2-beta.19 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequeueDuration = time.Millisecond * 1000

Functions

func GetRestoreSystemAccountPassword

func GetRestoreSystemAccountPassword(
	ctx context.Context,
	cli client.Reader,
	annotations map[string]string,
	componentName,
	accountName string,
) ([]byte, error)

func InDataContext4C

func InDataContext4C() *multicluster.ClientOption

func InDataContext4G

func InDataContext4G() model.GraphOption

func InUniversalContext4C

func InUniversalContext4C() *multicluster.ClientOption

func InUniversalContext4G

func InUniversalContext4G() model.GraphOption

func IntoContext

func IntoContext(ctx context.Context, placement string) context.Context

func IsOwnedByInstanceSet

func IsOwnedByInstanceSet(obj client.Object) bool

IsOwnedByInstanceSet is used to judge if the obj is owned by the InstanceSet controller

func Placement

func Placement(obj client.Object) string

func ResolveServiceDefaultFields

func ResolveServiceDefaultFields(oldSpec, newSpec *corev1.ServiceSpec)

func SendWarningEventWithError

func SendWarningEventWithError(
	recorder record.EventRecorder,
	obj client.Object,
	reason string,
	err error)

SendWarningEventWithError sends a warning event when occurs error.

Types

type MockReader

type MockReader struct {
	Objects []client.Object
}

func (*MockReader) Get

func (r *MockReader) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error

func (*MockReader) List

func (r *MockReader) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

Jump to

Keyboard shortcuts

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