(source string, target string)
| 155 | } |
| 156 | |
| 157 | func (m ModuleManager) rename(source string, target string) error { |
| 158 | return resiliency.RetryN(10, func(attempt int) error { |
| 159 | err := os.Rename(source, target) |
| 160 | if err != nil { |
| 161 | return resiliency.Retryable(err) |
| 162 | } |
| 163 | return nil |
| 164 | }) |
| 165 | } |
| 166 | |
| 167 | func (m ModuleManager) download(definition ModuleDefinition, destination string, progressBar *visualization.ProgressBar) error { |
| 168 | out, err := os.Create(destination) |