(lastSeq uint32, expiredAt time.Time)
| 22 | } |
| 23 | |
| 24 | func NewMigrationDataCache(lastSeq uint32, expiredAt time.Time) *MigrationDataCache { |
| 25 | return &MigrationDataCache{ |
| 26 | lastSeq: lastSeq, |
| 27 | expiredAt: expiredAt, |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // Add adds a message to the cache if there is a gap between the last sequence number and cached messages then return the cache State: |
| 32 | // - MigrationDataCacheStateWaiting: waiting for the next packet (lastSeq + 1) of last sequence from old node |
no outgoing calls