Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDynamicPV(name string) (bool, error)
- func CheckExpectValue(m map[string]string, key string, targetValue string) bool
- func ContainSubString(slice []string, s string) bool
- func ContainsEnv(envs []corev1.EnvVar, key string) bool
- func ContainsPrefix(slice []string, s string) bool
- func ContainsString(slice []string, s string) bool
- func ContainsVolumeDevices(vds []corev1.VolumeDevice, name string) bool
- func ContainsVolumeMounts(vms []corev1.VolumeMount, name string) bool
- func ContainsVolumes(volumes []corev1.Volume, name string) bool
- func DevMinor(dev uint64) uint32
- func DevMinorTableDelete(k any)
- func DevMinorTableLoad(k any) (uint32, bool)
- func DevMinorTableStore(k any, dev uint64)
- func DoWithContext(ctx context.Context, f func() error) error
- func DoWithTimeout(parent context.Context, timeout time.Duration, f func() error) error
- func Exists(path string) bool
- func GenLog(ctx context.Context, log klog.Logger, name string) klog.Logger
- func GetDiskUsage(path string) (uint64, uint64, uint64, uint64)
- func GetMountDeviceRefs(pathname string, corrupted bool) ([]string, error)
- func GetMountOptionsOfPod(pod *corev1.Pod) []string
- 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 ImageResol(image string) (hasCE, hasEE bool)
- func ImageSupportBinary(image string) bool
- func NewPrometheus(nodeName string) (prometheus.Registerer, *prometheus.Registry)
- func ParseEndpoint(endpoint string) (string, string, error)
- func ParseToBytes(value string) (uint64, error)
- func QuoteForShell(cmd string) string
- func RandStringRunes(n int) string
- func StripPasswd(uri string) string
- func StripReadonlyOption(options []string) []string
- func SupportFusePass(image string) bool
- func SupportUpgradeBinary(ce bool, version string) bool
- func SupportUpgradeRecreate(ce bool, version string) bool
- func UmountPath(ctx context.Context, sourcePath string)
- func WithLog(parentCtx context.Context, log klog.Logger) context.Context
- type ClientVersion
- type JuiceConf
- type LoggerType
Constants ¶
const LogKey = "jfs-logger"
Variables ¶
var (
MountPointDevMinorTable sync.Map
)
Functions ¶
func CheckDynamicPV ¶ added in v0.16.0
func CheckExpectValue ¶ added in v0.18.0
CheckExpectValue Check if the key has the expected value
func ContainSubString ¶ added in v0.25.0
func ContainsPrefix ¶ added in v0.17.2
ContainsPrefix String checks if a string slice contains a string with a given prefix
func ContainsString ¶ added in v0.10.0
ContainsString checks if a string is in a string slice.
func ContainsVolumeDevices ¶ added in v0.25.2
func ContainsVolumeDevices(vds []corev1.VolumeDevice, name string) bool
func ContainsVolumeMounts ¶ added in v0.25.2
func ContainsVolumeMounts(vms []corev1.VolumeMount, name string) bool
func ContainsVolumes ¶ added in v0.25.2
func DevMinorTableDelete ¶ added in v0.24.3
func DevMinorTableDelete(k any)
func DevMinorTableLoad ¶ added in v0.24.3
func DevMinorTableStore ¶ added in v0.24.3
func DoWithTimeout ¶ added in v0.17.1
func GetDiskUsage ¶ added in v0.23.4
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 GetMountOptionsOfPod ¶ added in v0.25.2
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 ImageResol ¶ added in v0.19.0
ImageResol check if image contains CE or EE ce image starts with "ce-" (latest image is CE) ee image starts with "ee-" Compatible with previous images: has both ce and ee
func ImageSupportBinary ¶ added in v0.25.1
func NewPrometheus ¶ added in v0.23.4
func NewPrometheus(nodeName string) (prometheus.Registerer, *prometheus.Registry)
func ParseToBytes ¶ added in v0.23.6
ParseToBytes parses a string with a unit suffix (e.g. "1M", "2G") to bytes. default unit is M
func QuoteForShell ¶ added in v0.13.0
func RandStringRunes ¶ added in v0.14.1
func StripPasswd ¶ added in v0.13.0
func StripReadonlyOption ¶ added in v0.17.4
func SupportFusePass ¶ added in v0.25.0
func SupportUpgradeBinary ¶ added in v0.25.0
func SupportUpgradeRecreate ¶ added in v0.25.0
func UmountPath ¶ added in v0.17.1
Types ¶
type ClientVersion ¶ added in v0.25.0
func (ClientVersion) LessThan ¶ added in v0.25.0
func (v ClientVersion) LessThan(o ClientVersion) bool
type JuiceConf ¶ added in v0.25.0
func ParseConfig ¶ added in v0.25.0
type LoggerType ¶ added in v0.25.0
type LoggerType string