kube-observable

2020-01-16

kube-observable

Watch Kubernetes resources with a resilient RxJS Observable client.

kube-observable

Watch events on Kubernetes resources using a resilient, reactive Observable.

  • Sets a random offset between re-connect times.
  • Uses exponential back-off on errors.
  • Get debug info by setting env var DEBUG=kube-observable:*.

Example

const PODS_URL = 'http://localhost:8001' +
  '/api/v1/namespaces/default/pods' +
  '?watch=true&timeoutSeconds=3';

const pods$ = require('../')(PODS_URL);

pods$
  .subscribe(obj => {
    console.log({
      type: obj.type,
      name: obj.object.metadata.name
    });
  });

Options

watchURL

The Kubernetes API URL used to watch resources.

License

MIT

以上是 kube-observable 的使用教程帮助文档。


上一篇:siren
下一篇:zetta
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部