當前位置: 首頁>>代碼示例>>Golang>>正文


Golang util.UnmountPath函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/volume/util.UnmountPath函數的典型用法代碼示例。如果您正苦於以下問題:Golang UnmountPath函數的具體用法?Golang UnmountPath怎麽用?Golang UnmountPath使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了UnmountPath函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: UnmountDevice

// UnmountDevice unmounts the volume on the node
func (detacher *azureDiskDetacher) UnmountDevice(deviceMountPath string) error {
	volume := path.Base(deviceMountPath)
	if err := util.UnmountPath(deviceMountPath, detacher.mounter); err != nil {
		glog.Errorf("Error unmounting %q: %v", volume, err)
		return err
	} else {
		return nil
	}
}
開發者ID:pst,項目名稱:kubernetes,代碼行數:10,代碼來源:attacher.go

示例2: SetUpAt

func (b *glusterfsMounter) SetUpAt(dir string, fsGroup *int64) error {
	notMnt, err := b.mounter.IsLikelyNotMountPoint(dir)
	glog.V(4).Infof("glusterfs: mount set up: %s %v %v", dir, !notMnt, err)
	if err != nil && !os.IsNotExist(err) {
		return err
	}
	if !notMnt {
		return nil
	}

	os.MkdirAll(dir, 0750)
	err = b.setUpAtInternal(dir)
	if err == nil {
		return nil
	}

	// Cleanup upon failure.
	volutil.UnmountPath(dir, b.mounter)
	return err
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:20,代碼來源:glusterfs.go

示例3: UnmountDevice

func (detacher *gcePersistentDiskDetacher) UnmountDevice(deviceMountPath string) error {
	return volumeutil.UnmountPath(deviceMountPath, detacher.host.GetMounter())
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:3,代碼來源:attacher.go

示例4: TearDownAt

// Unmounts the bind mount, and detaches the disk only if the PD
// resource was the last reference to that disk on the kubelet.
func (c *photonPersistentDiskUnmounter) TearDownAt(dir string) error {
	return util.UnmountPath(dir, c.mounter)
}
開發者ID:jonboulle,項目名稱:kubernetes,代碼行數:5,代碼來源:photon_pd.go

示例5: UnmountDevice

func (detacher *cinderDiskDetacher) UnmountDevice(deviceMountPath string) error {
	return volumeutil.UnmountPath(deviceMountPath, detacher.mounter)
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:3,代碼來源:attacher.go

示例6: TearDownAt

func (c *nfsUnmounter) TearDownAt(dir string) error {
	return util.UnmountPath(dir, c.mounter)
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:3,代碼來源:nfs.go

示例7: UnmountDevice

func (detacher *vsphereVMDKDetacher) UnmountDevice(deviceMountPath string) error {
	return volumeutil.UnmountPath(deviceMountPath, detacher.mounter)
}
開發者ID:upmc-enterprises,項目名稱:kubernetes,代碼行數:3,代碼來源:attacher.go

示例8: TearDownAt

// TearDownAt unmounts the bind mount
func (c *flockerVolumeUnmounter) TearDownAt(dir string) error {
	return util.UnmountPath(dir, c.mounter)
}
開發者ID:jonboulle,項目名稱:kubernetes,代碼行數:4,代碼來源:flocker.go

示例9: TearDownAt

// Unmounts the bind mount
func (c *awsElasticBlockStoreUnmounter) TearDownAt(dir string) error {
	return util.UnmountPath(dir, c.mounter)
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:4,代碼來源:aws_ebs.go

示例10: TearDownAt

func (c *glusterfsUnmounter) TearDownAt(dir string) error {
	return volutil.UnmountPath(dir, c.mounter)
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:3,代碼來源:glusterfs.go

示例11: TearDownAt

// Unmounts the bind mount, and detaches the disk only if the PD
// resource was the last reference to that disk on the kubelet.
func (v *vsphereVolumeUnmounter) TearDownAt(dir string) error {
	return util.UnmountPath(dir, v.mounter)
}
開發者ID:kubernetes,項目名稱:kubernetes,代碼行數:5,代碼來源:vsphere_volume.go


注:本文中的k8s/io/kubernetes/pkg/volume/util.UnmountPath函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。