Interface Watchable<T>

    • Method Detail

      • watch

        Watch watch​(Watcher<T> watcher)
        Watch returns Watch interface that watches requested resource
        Parameters:
        watcher - Watcher interface of Kubernetes resource
        Returns:
        watch interface Watch
      • watch

        Watch watch​(io.fabric8.kubernetes.api.model.ListOptions options,
                    Watcher<T> watcher)
        Watch returns Watch interface that watches requested resource

        The passed in options may be modified as a side-effect of this call.
        Values that already exist at this context, such as the labels, fields, and resourceVersion will be overridden on the passed in options regardless of initial values.

        Parameters:
        options - options available for watch operation
        watcher - Watcher interface of Kubernetes resource
        Returns:
        watch interface Watch
      • watch

        @Deprecated
        Watch watch​(String resourceVersion,
                    Watcher<T> watcher)
        Deprecated.
        Please use watch(ListOptions, Watcher) instead, it has a parameter of resourceVersion
        Watch returns Watch interface that watches requested resource from specified resourceVersion
        Parameters:
        resourceVersion - resource version from where to start watch
        watcher - Watcher interface of Kubernetes resource
        Returns:
        watch interface Watch
      • streamingList

        default CompletableFuture<String> streamingList​(Consumer<T> onItem)
        Helper method to use the WatchList feature to list resources. A watch is used under the covers, but will be terminated after the initial events.
        Not specifying a resourceVersion on the context or using 0 will perform a "consistent read" from the time at which the request started processing.
        Parameters:
        onItem - a consumer to be called for each item
        Returns:
        a CompletableFuture that provides the terminal resourceVersion, or any underlying exception during processing. It may be cancelled to terminate the streamingList operation early