watcher to support empty response (#313)

* Add a WatchAsync method.

* proposal for watcher async

* fix and add testcase for async watch

* try fix build
This commit is contained in:
Boshi Lian
2019-10-22 16:02:13 -07:00
committed by Kubernetes Prow Robot
parent 8ab95b6b92
commit a95400bd50
5 changed files with 82 additions and 30 deletions

View File

@@ -13,8 +13,8 @@ namespace watch
IKubernetes client = new Kubernetes(config);
var podlistResp = client.ListNamespacedPodWithHttpMessagesAsync("default", watch: true).Result;
using (podlistResp.Watch<V1Pod>((type, item) =>
var podlistResp = client.ListNamespacedPodWithHttpMessagesAsync("default", watch: true);
using (podlistResp.Watch<V1Pod, V1PodList>((type, item) =>
{
Console.WriteLine("==on watch event==");
Console.WriteLine(type);