(volume composetypes.ServiceVolumeConfig)
| 170 | } |
| 171 | |
| 172 | func handleNpipeToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) { |
| 173 | result := createMountFromVolume(volume) |
| 174 | |
| 175 | if volume.Source == "" { |
| 176 | return mount.Mount{}, errors.New("invalid npipe source, source cannot be empty") |
| 177 | } |
| 178 | if volume.Volume != nil { |
| 179 | return mount.Mount{}, errors.New("volume options are incompatible with type npipe") |
| 180 | } |
| 181 | if volume.Image != nil { |
| 182 | return mount.Mount{}, errors.New("image options are incompatible with type npipe") |
| 183 | } |
| 184 | if volume.Tmpfs != nil { |
| 185 | return mount.Mount{}, errors.New("tmpfs options are incompatible with type npipe") |
| 186 | } |
| 187 | if volume.Bind != nil { |
| 188 | result.BindOptions = &mount.BindOptions{ |
| 189 | Propagation: mount.Propagation(volume.Bind.Propagation), |
| 190 | } |
| 191 | } |
| 192 | return result, nil |
| 193 | } |
| 194 | |
| 195 | func handleClusterToMount( |
| 196 | volume composetypes.ServiceVolumeConfig, |
no test coverage detected
searching dependent graphs…