TransferQueue organises the wider process of uploading and downloading, including calling the API, passing the actual transfer request to transfer adapters, and dealing with progress, errors and retries.
| 185 | // including calling the API, passing the actual transfer request to transfer |
| 186 | // adapters, and dealing with progress, errors and retries. |
| 187 | type TransferQueue struct { |
| 188 | direction Direction |
| 189 | client *tqClient |
| 190 | remote string |
| 191 | ref *git.Ref |
| 192 | adapter Adapter |
| 193 | adapterInProgress bool |
| 194 | adapterInitMutex sync.Mutex |
| 195 | dryRun bool |
| 196 | cb tools.CopyCallback |
| 197 | meter *Meter |
| 198 | errors []error |
| 199 | transfers map[string]*objects |
| 200 | batchSize int |
| 201 | bufferDepth int |
| 202 | incoming chan *objectTuple // Channel for processing incoming items |
| 203 | errorc chan error // Channel for processing errors |
| 204 | watchers []chan *Transfer |
| 205 | trMutex *sync.Mutex |
| 206 | collectorWait sync.WaitGroup |
| 207 | errorwait sync.WaitGroup |
| 208 | // wait is used to keep track of pending transfers. It is incremented |
| 209 | // once per unique OID on Add(), and is decremented when that transfer |
| 210 | // is marked as completed or failed, but not retried. |
| 211 | wait *abortableWaitGroup |
| 212 | manifest Manifest |
| 213 | rc *retryCounter |
| 214 | |
| 215 | // unsupportedContentType indicates whether the transfer queue ever saw |
| 216 | // an HTTP 422 response indicating that their upload destination does |
| 217 | // not support Content-Type detection. |
| 218 | unsupportedContentType bool |
| 219 | } |
| 220 | |
| 221 | // objects holds a set of objects. |
| 222 | type objects struct { |
nothing calls this directly
no outgoing calls
no test coverage detected