Backstage
    Preparing search index...

    Watches Kubernetes resources for changes.

    Separated from KubernetesFetcher because watching is a long-lived streaming connection that only works with server-side auth providers.

    interface KubernetesWatcher {
        watchResource(
            params: KubernetesWatchParams,
            options?: KubernetesWatchOptions,
        ): AsyncGenerator<KubernetesWatchEvent, void, undefined>;
    }
    Index
    • Watch Kubernetes resources for changes.

      Returns an AsyncGenerator whose three type parameters are:

      • Yield (KubernetesWatchEvent): each yield produces a watch event. Errors are yielded as { type: 'ERROR', error } (errors-as-data), not thrown, so consumers handle them in the same for await loop.
      • Return (void): the generator never produces a meaningful completion value — it ends with bare return or by exhausting the stream.
      • Next (undefined): the consumer cannot send values into the generator via .next(value); this is a produce-only stream.

      Parameters

      Returns AsyncGenerator<KubernetesWatchEvent, void, undefined>