util

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PODHOSTNAME  = "/etc/hostname"
	PODNAMESPACE = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
)
View Source
const (
	IndexerPathForNodepool = "spec.nodePool"
)

Variables

This section is empty.

Functions

func FloatToStr

func FloatToStr(num *float64) string

func GetDeviceCondition

GetDeviceCondition returns the condition with the provided type.

func GetDeviceServiceCondition

GetDeviceServiceCondition returns the condition with the provided type.

func GetEdgeDeviceName

func GetEdgeDeviceName(d *iotv1alpha1.Device, label string) string

func GetEdgeDeviceProfileName

func GetEdgeDeviceProfileName(dp *iotv1alpha1.DeviceProfile, label string) string

func GetEdgeDeviceServiceName

func GetEdgeDeviceServiceName(ds *iotv1alpha1.DeviceService, label string) string

func GetNodePool

func GetNodePool(cfg *rest.Config) (string, error)

GetNodePool get nodepool where yurt-iot-dock run

func IntToStr

func IntToStr(num *int64) string

func IsInStringLst

func IsInStringLst(strLst []string, str string) bool

IsInStringLst checks if 'str' is in the 'strLst'

func NewDeviceCondition

func NewDeviceCondition(condType iotv1alpha1.DeviceConditionType, status corev1.ConditionStatus, reason, message string) *iotv1alpha1.DeviceCondition

NewDeviceCondition creates a new Device condition.

func NewDeviceServiceCondition

func NewDeviceServiceCondition(condType iotv1alpha1.DeviceServiceConditionType, status corev1.ConditionStatus, reason, message string) *iotv1alpha1.DeviceServiceCondition

NewDeviceServiceCondition creates a new DeviceService condition.

func RegisterFieldIndexers

func RegisterFieldIndexers(fi client.FieldIndexer) error

func SetDeviceCondition

func SetDeviceCondition(status *iotv1alpha1.DeviceStatus, condition *iotv1alpha1.DeviceCondition)

SetDeviceCondition updates the Device to include the provided condition. If the condition that we are about to add already exists and has the same status, reason and message then we are not going to update.

func SetDeviceServiceCondition

func SetDeviceServiceCondition(status *iotv1alpha1.DeviceServiceStatus, condition *iotv1alpha1.DeviceServiceCondition)

SetDeviceServiceCondition updates the DeviceService to include the provided condition. If the condition that we are about to add already exists and has the same status, reason and message then we are not going to update.

func StrToFloat

func StrToFloat(str string) *float64

func StrToInt

func StrToInt(str string) *int64

func StrToUint

func StrToUint(str string) *uint64

func UintToStr

func UintToStr(num *uint64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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