Method
AddChannel
(channelName string, atSequence uint64)
Source from the content-addressed store, hash-verified
| 157 | } |
| 158 | |
| 159 | func (set TimedSet) AddChannel(channelName string, atSequence uint64) bool { |
| 160 | if atSequence > 0 { |
| 161 | if oldSequence := set[channelName]; oldSequence.Sequence == 0 || atSequence < oldSequence.Sequence { |
| 162 | set[channelName] = NewVbSimpleSequence(atSequence) |
| 163 | return true |
| 164 | } |
| 165 | } |
| 166 | return false |
| 167 | } |
| 168 | |
| 169 | // Merges the other set into the receiver. In case of collisions the earliest sequence wins. |
| 170 | func (set TimedSet) Add(other TimedSet) bool { |