util

package
v0.0.0-...-3648c5b Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsV1Supported bool
)

Functions

func GetBoolValueOrDefault

func GetBoolValueOrDefault(ptr *bool, defaultValue bool) bool

GetBoolValueOrDefault returns the value of a bool pointer or a default value.

func GetInt32ValueOrDefault

func GetInt32ValueOrDefault(ptr *int32, defaultValue int32) int32

GetInt32ValueOrDefault returns the value of an int32 pointer or a default value.

func GetStringValueOrDefault

func GetStringValueOrDefault(ptr *string, defaultValue string) string

GetStringValueOrDefault returns the value of a string pointer or a default value.

func SetK8sVersionGreaterOrEqual

func SetK8sVersionGreaterOrEqual(config *rest.Config, targetMajor, targetMinor int)

SetK8sVersionGreaterOrEqual 检测集群版本是否 ≥ 目标版本(如 "1.21")

func UnmarshalAppSpecificConfig

func UnmarshalAppSpecificConfig(appCompType string, rawProperties runtime.RawExtension) (interface{}, error)

--- Configuration Unmarshalling Helper --- Unmarshals raw ApplicationComponent.Properties based on the component type string into the correct specific Go configuration struct pointer. Returns the unmarshalled struct pointer (as interface{}) or nil if no properties are provided. Returns error if unmarshalling fails for the given type or type is unknown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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