使用 fabric8io kubernetes-client;是否可以删除 [自定义] 观察程序?



Watcher:

private final class CustomKubeWatcher implements Watcher<Pod> { ... }

添加使用:

kubeClient.pods().inNamespace(kubeNamespace).watch(customKubeWatcher);

如何停止观察程序?当我的客户端实例是 GC'd 时,它会被清理吗?

https://github.com/fabric8io/kubernetes-client

除非我错过了什么,否则watch()将返回一个可以关闭的Watch对象。

最新更新