(bind *types.ServiceVolumeBind)
| 1267 | } |
| 1268 | |
| 1269 | func buildBindOption(bind *types.ServiceVolumeBind) *mount.BindOptions { |
| 1270 | if bind == nil { |
| 1271 | return nil |
| 1272 | } |
| 1273 | opts := &mount.BindOptions{ |
| 1274 | Propagation: mount.Propagation(bind.Propagation), |
| 1275 | CreateMountpoint: bool(bind.CreateHostPath), |
| 1276 | } |
| 1277 | switch bind.Recursive { |
| 1278 | case "disabled": |
| 1279 | opts.NonRecursive = true |
| 1280 | case "writable": |
| 1281 | opts.ReadOnlyNonRecursive = true |
| 1282 | case "readonly": |
| 1283 | opts.ReadOnlyForceRecursive = true |
| 1284 | } |
| 1285 | return opts |
| 1286 | } |
| 1287 | |
| 1288 | func buildVolumeOptions(vol *types.ServiceVolumeVolume) *mount.VolumeOptions { |
| 1289 | if vol == nil { |
no outgoing calls
no test coverage detected
searching dependent graphs…