UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

Provides core APIs, types and utilities used by dynamic plugins at runtime.

20 lines (19 loc) 806 B
import { UseK8sWatchResources } from '../../../extensions/console-types'; /** * Hook that retrieves the Kubernetes resources along with their respective status for loaded and error. * @param initResources resources need to be watched as key-value pair, wherein key will be unique to resource and value will be options needed to watch for the respective resource. * @returns A map where keys are as provided in initResouces and value has three properties data, loaded and error. * @example * ```ts * const Component: React.FC = () => { * const watchResources = { 'deployment': {...}, 'pod': {...} ... } * const {deployment, pod} = useK8sWatchResources(watchResources) * return ... * } * ``` */ export declare const useK8sWatchResources: UseK8sWatchResources;