Skip to content

Commit

Permalink
Merge pull request kubernetes#75474 from hormes/add_heartbeat_inside_…
Browse files Browse the repository at this point in the history
…watch

add heartbeat inside watch
  • Loading branch information
k8s-ci-robot committed Apr 16, 2019
2 parents 2347da8 + d70edd3 commit 84a859f
Show file tree
Hide file tree
Showing 14 changed files with 572 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (d *decoratedWatcher) run(ctx context.Context) {
return
}
switch recv.Type {
case watch.Added, watch.Modified, watch.Deleted:
case watch.Added, watch.Modified, watch.Deleted, watch.Bookmark:
err := d.decorator(recv.Object)
if err != nil {
send = makeStatusErrorEvent(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOpti
resourceVersion := ""
if options != nil {
resourceVersion = options.ResourceVersion
predicate.AllowWatchBookmarks = options.AllowWatchBookmarks
}
return e.WatchPredicate(ctx, predicate, resourceVersion)
}
Expand Down
3 changes: 3 additions & 0 deletions staging/src/k8s.io/apiserver/pkg/storage/cacher/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/apis/example:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/apis/example/v1:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/features:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/storage:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/storage/etcd:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature/testing:go_default_library",
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
],
)
Expand Down
Loading

0 comments on commit 84a859f

Please sign in to comment.