UNPKG

@mittwald/kubernetes

Version:

Kubernetes client library

20 lines (19 loc) 1.05 kB
import { IKubernetesRESTClient, ListOptions, PatchKind, WatchOptions, WatchResult } from "./client"; import { Registry } from "prom-client"; import { DeleteOptions, WatchEvent } from "./types/meta/v1"; import { MetadataObject } from "./types/meta"; export declare class MonitoringKubernetesRESTClient implements IKubernetesRESTClient { private readonly inner; private readonly requestLatencies; private readonly errorCount; constructor(inner: IKubernetesRESTClient, registry: Registry); private wrap; 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>; }