Commit 62c0e5ab authored by Hongchao Deng's avatar Hongchao Deng

pkg/storage: docs on watch 0 behavior

parent 34db128a
...@@ -112,6 +112,8 @@ type Interface interface { ...@@ -112,6 +112,8 @@ type Interface interface {
// resourceVersion may be used to specify what version to begin watching, // resourceVersion may be used to specify what version to begin watching,
// which should be the current resourceVersion, and no longer rv+1 // which should be the current resourceVersion, and no longer rv+1
// (e.g. reconnecting without missing any updates). // (e.g. reconnecting without missing any updates).
// If resource version is "0", this interface will get current object at given key
// and send it in an "ADDED" event, before watch starts.
Watch(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error) Watch(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error)
// WatchList begins watching the specified key's items. Items are decoded into API // WatchList begins watching the specified key's items. Items are decoded into API
...@@ -119,6 +121,8 @@ type Interface interface { ...@@ -119,6 +121,8 @@ type Interface interface {
// resourceVersion may be used to specify what version to begin watching, // resourceVersion may be used to specify what version to begin watching,
// which should be the current resourceVersion, and no longer rv+1 // which should be the current resourceVersion, and no longer rv+1
// (e.g. reconnecting without missing any updates). // (e.g. reconnecting without missing any updates).
// If resource version is "0", this interface will list current objects directory defined by key
// and send them in "ADDED" events, before watch starts.
WatchList(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error) WatchList(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error)
// Get unmarshals json found at key into objPtr. On a not found error, will either // Get unmarshals json found at key into objPtr. On a not found error, will either
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment