util

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	YurtHubAddress = "http://127.0.0.1:10267"
	YurtHubAPIPath = "/pods"
)
View Source
const (
	YamlSuffix    string = ".yaml"
	BackupSuffix         = ".bak"
	UpgradeSuffix string = ".upgrade"

	StaticPodHashAnnotation = "openyurt.io/static-pod-hash"
)

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

CopyFile copy file content from src to dst, if destination file not exist, then create it

func GetPodFromYurtHub

func GetPodFromYurtHub(namespace, name string) (*v1.Pod, error)

func GetPodsFromYurtHub

func GetPodsFromYurtHub(url string) (*v1.PodList, error)

func WaitForPodRunning

func WaitForPodRunning(namespace, name, hash string, timeout time.Duration) (bool, error)

WaitForPodRunning waits static pod to run Success: Static pod annotation `StaticPodHashAnnotation` value equals to function argument hash Failed: Receive PodFailed event

func WithBackupSuffix

func WithBackupSuffix(path string) string

func WithUpgradeSuffix

func WithUpgradeSuffix(path string) string

func WithYamlSuffix

func WithYamlSuffix(path string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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