本文整理汇总了Golang中github.com/docker/docker/volume.MountPoint类的典型用法代码示例。如果您正苦于以下问题:Golang MountPoint类的具体用法?Golang MountPoint怎么用?Golang MountPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MountPoint类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: lazyInitializeVolume
// lazyInitializeVolume initializes a mountpoint's volume if needed.
// This happens after a daemon restart.
func (daemon *Daemon) lazyInitializeVolume(containerID string, m *volume.MountPoint) error {
if len(m.Driver) > 0 && m.Volume == nil {
v, err := daemon.volumes.GetWithRef(m.Name, m.Driver, containerID)
if err != nil {
return err
}
m.Volume = v
}
return nil
}
开发者ID:Mic92,项目名称:docker,代码行数:12,代码来源:volumes.go
示例2: setBindModeIfNull
// setBindModeIfNull is platform specific processing to ensure the
// shared mode is set to 'z' if it is null. This is called in the case
// of processing a named volume and not a typical bind.
func setBindModeIfNull(bind *volume.MountPoint) *volume.MountPoint {
if bind.Mode == "" {
bind.Mode = "z"
}
return bind
}
开发者ID:maaquib,项目名称:docker,代码行数:9,代码来源:volumes_unix.go
示例3: setBindModeIfNull
// setBindModeIfNull is platform specific processing to ensure the
// shared mode is set to 'z' if it is null. This is called in the case
// of processing a named volume and not a typical bind.
func setBindModeIfNull(bind *volume.MountPoint) {
if bind.Mode == "" {
bind.Mode = "z"
}
}
开发者ID:msabansal,项目名称:docker,代码行数:8,代码来源:volumes_unix.go
注:本文中的github.com/docker/docker/volume.MountPoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论