Returns a lateSequenceFeed for the channel, used to find late-arriving (previously skipped) sequences that have been sent to the channel cache. The lateSequenceFeed stores the last (late) sequence seen by this particular _changes feed to support continuous changes.
(singleChannelCache SingleChannelCache)
| 1261 | // skipped) sequences that have been sent to the channel cache. The lateSequenceFeed stores the last (late) |
| 1262 | // sequence seen by this particular _changes feed to support continuous changes. |
| 1263 | func (db *DatabaseCollectionWithUser) newLateSequenceFeed(singleChannelCache SingleChannelCache) *lateSequenceFeed { |
| 1264 | |
| 1265 | if !singleChannelCache.SupportsLateFeed() { |
| 1266 | return nil |
| 1267 | } |
| 1268 | |
| 1269 | lsf := &lateSequenceFeed{ |
| 1270 | active: true, |
| 1271 | lateSequenceUUID: singleChannelCache.LateSequenceUUID(), |
| 1272 | channel: singleChannelCache.ChannelID(), |
| 1273 | lastSequence: singleChannelCache.RegisterLateSequenceClient(), |
| 1274 | } |
| 1275 | return lsf |
| 1276 | } |
| 1277 | |
| 1278 | // Feed to process late sequences for the channel. Updates lastSequence as it works the feed. Error indicates |
| 1279 | // previous position in late sequence feed isn't available, and caller should reset to low sequence. |
no test coverage detected