UNPKG

973 BTypeScriptView Raw
1import { IKubernetesRESTClient, ListOptions, PatchKind, WatchOptions, WatchResult } from "./client";
2import Bottleneck from "bottleneck";
3import { DeleteOptions, WatchEvent } from "./types/meta/v1";
4import { MetadataObject } from "./types/meta";
5export declare class RatelimitedKubernetesRESTClient implements IKubernetesRESTClient {
6 private inner;
7 private limiter;
8 constructor(inner: IKubernetesRESTClient, limiter?: Bottleneck);
9 post<R>(url: string, body: any): Promise<R>;
10 put<R>(url: string, body: any): Promise<R>;
11 delete<R>(url: string, opts?: DeleteOptions, queryParams?: {
12 [p: string]: string;
13 }, body?: any): Promise<R>;
14 get<R>(url: string, opts?: ListOptions): Promise<R | undefined>;
15 patch<R = any>(url: string, body: any, patchKind: PatchKind): Promise<R>;
16 watch<R extends MetadataObject>(url: string, onUpdate: (o: WatchEvent<R>) => any, onError: (err: any) => any, opts?: WatchOptions): Promise<WatchResult>;
17}