Watch returns a channel where the queue will write the value of each transfer as it completes. If multiple transfers exist with the same OID, they will all be recorded here, even though only one actual transfer took place. The channel will be closed when the queue finishes processing.
()
| 1005 | // be recorded here, even though only one actual transfer took place. The |
| 1006 | // channel will be closed when the queue finishes processing. |
| 1007 | func (q *TransferQueue) Watch() chan *Transfer { |
| 1008 | c := make(chan *Transfer, q.batchSize) |
| 1009 | q.watchers = append(q.watchers, c) |
| 1010 | return c |
| 1011 | } |
| 1012 | |
| 1013 | // This goroutine collects errors returned from transfers |
| 1014 | func (q *TransferQueue) errorCollector() { |
no outgoing calls
no test coverage detected