Documentation ¶
Index ¶
- func CheckDynamicPV(name string) (bool, error)
- func ConsistentRead(filename string, attempts int) ([]byte, error)
- func ContainsString(slice []string, s string) bool
- func DeleteResourceOfPod(pod *corev1.Pod)
- func DoWithinTime(ctx context.Context, timeout time.Duration, cmd *exec.Cmd, f func() error) (out []byte, err error)
- func GetMountDeviceRefs(pathname string, corrupted bool) ([]string, error)
- func GetMountPathOfPod(pod corev1.Pod) (string, string, error)
- func GetReferenceKey(target string) string
- func GetTime(str string) (time.Time, error)
- func GetTimeAfterDelay(delayStr string) (string, error)
- func IsJobCompleted(job *batchv1.Job) bool
- func IsJobFailed(job *batchv1.Job) bool
- func IsPodError(pod *corev1.Pod) bool
- func IsPodHasResource(pod corev1.Pod) bool
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodResourceError(pod *corev1.Pod) bool
- func ParseEndpoint(endpoint string) (string, string, error)
- func ParseMntPath(cmd string) (string, string, error)
- func PatchPodAnnotation(client *k8s.K8sClient, pod *corev1.Pod, annotation map[string]string) error
- func QuoteForShell(cmd string) string
- func RandStringRunes(n int) string
- func RemoveFinalizer(client *k8sclient.K8sClient, pod *corev1.Pod, finalizer string) error
- func ShouldDelay(pod *corev1.Pod, Client *k8s.K8sClient) (shouldDelay bool, err error)
- func StripPasswd(uri string) string
- type PVCMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDynamicPV ¶ added in v0.16.0
func ConsistentRead ¶ added in v0.14.1
ConsistentRead repeatedly reads a file until it gets the same content twice. This is useful when reading files in /proc that are larger than page size and kernel may modify them between individual read() syscalls.
func ContainsString ¶ added in v0.10.0
func DeleteResourceOfPod ¶ added in v0.10.0
func DoWithinTime ¶ added in v0.15.0
func GetMountDeviceRefs ¶ added in v0.13.2
GetMountDeviceRefs Get all mountpoints whose source is the device of `pathname` mountpoint, the `pathname` will be excluded. The `pathname` must be a mountpoint, and if the `corrupted` is true, the `pathname` is a corrupted mountpoint.
func GetMountPathOfPod ¶ added in v0.10.7
func GetReferenceKey ¶ added in v0.10.7
func GetTimeAfterDelay ¶ added in v0.13.0
GetTimeAfterDelay get time which after delay
func IsJobCompleted ¶ added in v0.13.0
func IsJobFailed ¶ added in v0.13.0
func IsPodError ¶ added in v0.10.0
func IsPodHasResource ¶ added in v0.10.0
func IsPodReady ¶ added in v0.10.0
func IsPodResourceError ¶ added in v0.10.0
func ParseMntPath ¶ added in v0.10.7
ParseMntPath return mntPath, volumeId (/jfs/volumeId, volumeId err)
func PatchPodAnnotation ¶ added in v0.13.2
func QuoteForShell ¶ added in v0.13.0
func RandStringRunes ¶ added in v0.14.1
func RemoveFinalizer ¶ added in v0.15.0
func ShouldDelay ¶ added in v0.13.0
func StripPasswd ¶ added in v0.13.0
Types ¶
type PVCMetadata ¶ added in v0.13.3
type PVCMetadata struct {
// contains filtered or unexported fields
}
func NewPVCMeta ¶ added in v0.13.3
func NewPVCMeta(pvc v1.PersistentVolumeClaim) *PVCMetadata
func (*PVCMetadata) StringParser ¶ added in v0.13.3
func (meta *PVCMetadata) StringParser(str string) string
Click to show internal directories.
Click to hide internal directories.