当前位置: 首页>>代码示例>>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;未经允许,请勿转载。