Skip to content

Commit 36924c1

Browse files
Merge pull request #152 from nicolaferraro/master
Align documentation to actual code
2 parents dde71be + 4106251 commit 36924c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ watch on namespace object:
8686
```java
8787
import com.google.gson.reflect.TypeToken;
8888
import io.kubernetes.client.ApiClient;
89-
import io.kubernetes.client.Watch;
9089
import io.kubernetes.client.ApiException;
9190
import io.kubernetes.client.Configuration;
9291
import io.kubernetes.client.apis.CoreV1Api;
9392
import io.kubernetes.client.models.V1Namespace;
9493
import io.kubernetes.client.util.Config;
94+
import io.kubernetes.client.util.Watch;
9595

9696
import java.io.IOException;
9797

@@ -102,8 +102,9 @@ public class WatchExample {
102102

103103
CoreV1Api api = new CoreV1Api();
104104

105-
Watch<V1Namespace> watch = client.watch(
106-
api.listNamespaceCall(null, null, null, null, 5, Boolean.TRUE, null, null),
105+
Watch<V1Namespace> watch = Watch.createWatch(
106+
client,
107+
api.listNamespaceCall(null, null, null, null, null, 5, null, null, Boolean.TRUE, null, null),
107108
new TypeToken<Watch.Response<V1Namespace>>(){}.getType());
108109

109110
for (Watch.Response<V1Namespace> item : watch) {

0 commit comments

Comments
 (0)