Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future as well as to encode information with the resource version. This changes /watch/resources?resourceVersion=3 to start the watch at 4 instead of 3, which means clients can read a resource version and then send it back to the server. Clients should no longer do math on resource versions.
This commit is contained in:
@@ -324,7 +324,7 @@ type FakeWatcher struct {
|
||||
*client.Fake
|
||||
}
|
||||
|
||||
func (fw FakeWatcher) WatchReplicationControllers(ctx api.Context, l, f labels.Selector, rv uint64) (watch.Interface, error) {
|
||||
func (fw FakeWatcher) WatchReplicationControllers(ctx api.Context, l, f labels.Selector, rv string) (watch.Interface, error) {
|
||||
return fw.w, nil
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ func TestWatchControllers(t *testing.T) {
|
||||
return nil
|
||||
}
|
||||
|
||||
resourceVersion := uint64(0)
|
||||
resourceVersion := ""
|
||||
go manager.watchControllers(&resourceVersion)
|
||||
|
||||
// Test normal case
|
||||
|
Reference in New Issue
Block a user