UNPKG

@mittwald/kubernetes

Version:

Kubernetes client library

18 lines (17 loc) 991 B
import { IKubernetesRESTClient, ListOptions, PatchKind, WatchOptions, WatchResult } from "./client"; import Bottleneck from "bottleneck"; import { DeleteOptions, WatchEvent } from "./types/meta/v1"; import { MetadataObject } from "./types/meta"; export declare class RatelimitedKubernetesRESTClient implements IKubernetesRESTClient { private readonly inner; private readonly limiter; constructor(inner: IKubernetesRESTClient, limiter?: Bottleneck); post<R>(url: string, body: any): Promise<R>; put<R>(url: string, body: any): Promise<R>; delete<R>(url: string, opts?: DeleteOptions, queryParams?: { [p: string]: string; }, body?: any): Promise<R>; get<R>(url: string, opts?: ListOptions): Promise<R | undefined>; patch<R = any>(url: string, body: any, patchKind: PatchKind): Promise<R>; watch<R extends MetadataObject>(url: string, onUpdate: (o: WatchEvent<R>) => any, onError: (err: any) => any, opts?: WatchOptions): Promise<WatchResult>; }