InitDownstream inits the downstream
(reader io.ReadCloser, writer io.WriteCloser)
| 153 | |
| 154 | // InitDownstream inits the downstream |
| 155 | func (s *Sync) InitDownstream(reader io.ReadCloser, writer io.WriteCloser) error { |
| 156 | downstream, err := newDownstream(reader, writer, s) |
| 157 | if err != nil { |
| 158 | return errors.Wrap(err, "new upstream") |
| 159 | } |
| 160 | |
| 161 | s.downstream = downstream |
| 162 | return nil |
| 163 | } |
| 164 | |
| 165 | // Start starts a new sync instance |
| 166 | func (s *Sync) Start(onInitUploadDone chan struct{}, onInitDownloadDone chan struct{}, onDone chan struct{}, onError chan error) error { |