getSyncList gets a list of all sync fragments after the specified usn and aggregates them into a syncList data structure
(ctx context.DnoteCtx, afterUSN int)
| 146 | // getSyncList gets a list of all sync fragments after the specified usn |
| 147 | // and aggregates them into a syncList data structure |
| 148 | func getSyncList(ctx context.DnoteCtx, afterUSN int) (syncList, error) { |
| 149 | fragments, err := getSyncFragments(ctx, afterUSN) |
| 150 | if err != nil { |
| 151 | return syncList{}, errors.Wrap(err, "getting sync fragments") |
| 152 | } |
| 153 | |
| 154 | ret, err := processFragments(fragments) |
| 155 | if err != nil { |
| 156 | return syncList{}, errors.Wrap(err, "making sync list") |
| 157 | } |
| 158 | |
| 159 | return ret, nil |
| 160 | } |
| 161 | |
| 162 | // getSyncFragments repeatedly gets all sync fragments after the specified usn until there is no more new data |
| 163 | // remaining and returns the buffered list |
no test coverage detected