Method
run
(ctx context.Context, isLocal bool)
Source from the content-addressed store, hash-verified
| 159 | } |
| 160 | |
| 161 | func (s *sourceManager) run(ctx context.Context, isLocal bool) { |
| 162 | // make sure we run in a detached context, which ignores outside cancellation and deadline. |
| 163 | ctx = context.WithoutCancel(ctx) |
| 164 | |
| 165 | s.setStatus("INITIALIZING") |
| 166 | defer s.setStatus("STOPPED") |
| 167 | |
| 168 | s.wg.Add(1) |
| 169 | defer s.wg.Done() |
| 170 | |
| 171 | if isLocal { |
| 172 | s.runLocal(ctx) |
| 173 | } else { |
| 174 | s.runReadOnly() |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func (s *sourceManager) runLocal(ctx context.Context) { |
| 179 | if s.isPaused() { |
Tested by
no test coverage detected