Documentation ¶
Index ¶
- func GenTLSConfig(key, cert, ca string) (*tls.Config, error)
- func If(cond bool, v1, v2 interface{}) interface{}
- func IsMountpoint(dir string) bool
- func MakeFSVolume(fscmd []string, devicePath string, timeout time.Duration) error
- func MountVolume(mountCmd []string, devicePath, mountPath string, timeout time.Duration) error
- func SetupTLSFlag(fs *pflag.FlagSet, tlsCfg *TLSConfig)
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTLSConfig ¶
GenTLSConfig returns a tls config object according to inputting parameters.
func If ¶
func If(cond bool, v1, v2 interface{}) interface{}
If implements ternary operator. if cond is true return v1, or return v2 instead.
func IsMountpoint ¶
IsMountpoint is used to check the directory is mountpoint or not.
func MakeFSVolume ¶
MakeFSVolume is used to make file system on device with format type and options.
func MountVolume ¶
MountVolume is used to mount device to directory with options.
func SetupTLSFlag ¶
SetupTLSFlag setups flags of tls arguments
Types ¶
Click to show internal directories.
Click to hide internal directories.