Documentation ¶
Index ¶
- Constants
- func ConvertLabelsStringToMap(labels string) (map[string]string, error)
- func GetSocketBasePath(targetPath, fuseSocketDir string) string
- func ParseEndpoint(endpoint string, cleanupSocket bool) (string, string, error)
- func ParsePodIDVolumeFromTargetpath(targetPath string) (string, string, error)
- func PrepareEmptyDir(targetPath string, createEmptyDir bool) (string, error)
- func RecvMsg(via net.Conn) (int, []byte, error)
- func SendMsg(via net.Conn, fd int, msg []byte) error
- type VolumeLocks
Constants ¶
View Source
const ( Mb = 1024 * 1024 TrueStr = "true" FalseStr = "false" // mount options that both CSI mounter and sidecar mounter should understand. DisableMetricsForGKE = "disable-metrics-for-gke" )
View Source
const (
VolumeOperationAlreadyExistsFmt = "An operation with the given volume key %s already exists"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertLabelsStringToMap ¶
ConvertLabelsStringToMap converts the labels from string to map example: "key1=value1,key2=value2" gets converted into {"key1": "value1", "key2": "value2"}
func GetSocketBasePath ¶ added in v1.6.0
func ParseEndpoint ¶
Types ¶
type VolumeLocks ¶
type VolumeLocks struct {
// contains filtered or unexported fields
}
VolumeLocks implements a map with atomic operations. It stores a set of all volume IDs with an ongoing operation.
func NewVolumeLocks ¶
func NewVolumeLocks() *VolumeLocks
func (*VolumeLocks) Release ¶
func (vl *VolumeLocks) Release(volumeID string)
func (*VolumeLocks) TryAcquire ¶
func (vl *VolumeLocks) TryAcquire(volumeID string) bool
TryAcquire tries to acquire the lock for operating on volumeID and returns true if successful. If another operation is already using volumeID, returns false.
Click to show internal directories.
Click to hide internal directories.