type APIObjectVersioner … // UpdateObject implements Versioner func (a APIObjectVersioner) UpdateObject(obj runtime.Object, resourceVersion uint64) error { … } // UpdateList implements Versioner func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64, nextKey string, count *int64) error { … } // PrepareObjectForStorage clears resourceVersion and selfLink prior to writing to etcd. func (a APIObjectVersioner) PrepareObjectForStorage(obj runtime.Object) error { … } // ObjectResourceVersion implements Versioner func (a APIObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error) { … } // ParseResourceVersion takes a resource version argument and converts it to // the etcd version. For watch we should pass to helper.Watch(). Because resourceVersion is // an opaque value, the default watch behavior for non-zero watch is to watch // the next value (if you pass "1", you will see updates from "2" onwards). func (a APIObjectVersioner) ParseResourceVersion(resourceVersion string) (uint64, error) { … } var _ … // CompareResourceVersion compares etcd resource versions. Outside this API they are all strings, // but etcd resource versions are special, they're actually ints, so we can easily compare them. func (a APIObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int { … }