GoogleCloudPlatform/kubernetes — pull request #805 by lavalamp (2014-08-06 01:08:07+00:00)
Title: Improve watch

The idea here is to let watch:

* take a resource version so you can pick up where you left off if you get disconnected
* take a label selector so you can watch things with specific labels
* take a field selector so you can watch things with specific fields (so if a scheduler wants to watch for unassigned pods, it can watch for pods with Host="".)
* The idea is that, for the moment, you'd only be able to watch for specific fields if the server supports watching on those fields, otherwise you'll get an error. I'm not writing a fully general struct field watcher just yet.
* I had to make client a bit more testable & flexible for this.

I'll squash some of these commits down once it's confirmed that this is a good direction.