Module: lib/k8s/apiProxy

    Interfaces

    Type aliases

    StreamErrCb

    Ƭ StreamErrCb: (err: Error & { status?: number }, cancelStreamFunc?: () => void) => void

    Type declaration

    ▸ (err, cancelStreamFunc?): void

    Parameters
    Name Type
    err Error & { status?: number }
    cancelStreamFunc? () => void
    Returns

    void

    Defined in

    lib/k8s/apiProxy.ts:109


    StreamResultsCb

    Ƭ StreamResultsCb: (…args: any[]) => void

    Type declaration

    ▸ (…args): void

    Parameters
    Name Type
    ...args any[]
    Returns

    void

    Defined in

    lib/k8s/apiProxy.ts:108

    Functions

    apiFactory

    apiFactory(…args): Object

    Parameters

    Name Type
    ...args [group: string, version: string, resource: string] | [group: string, version: string, resource: string][]

    Returns

    Object

    Name Type
    delete (name: string) => Promise<any>
    get (name: string, cb: StreamResultsCb , errCb: StreamErrCb ) => Promise<() => void>
    isNamespaced boolean
    list (cb: StreamResultsCb , errCb: StreamErrCb ) => Promise<() => void>
    patch (body: OpPatch[], name: string) => Promise<any>
    post (body: KubeObjectInterface ) => Promise<any>
    put (body: KubeObjectInterface ) => Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:175


    apiFactoryWithNamespace

    apiFactoryWithNamespace(…args): Object

    Parameters

    Name Type
    ...args [group: string, version: string, resource: string, includeScale: boolean] | [group: string, version: string, resource: string, includeScale: boolean][]

    Returns

    Object

    Defined in

    lib/k8s/apiProxy.ts:220


    apply

    apply(body): Promise<JSON>

    Parameters

    Name Type
    body KubeObjectInterface

    Returns

    Promise<JSON>

    Defined in

    lib/k8s/apiProxy.ts:625


    metrics

    metrics(url, onMetrics, onError?): Promise<() => void>

    Parameters

    Name Type
    url string
    onMetrics (arg: KubeMetrics []) => void
    onError? (err: ApiError ) => void

    Returns

    Promise<() => void>

    Defined in

    lib/k8s/apiProxy.ts:644


    patch

    patch(url, json, autoLogoutOnAuthError?, requestOptions?): Promise<any>

    Parameters

    Name Type Default value
    url string undefined
    json any undefined
    autoLogoutOnAuthError boolean true
    requestOptions Object {}

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:351


    post

    post(url, json, autoLogoutOnAuthError?, requestOptions?): Promise<any>

    Parameters

    Name Type Default value
    url string undefined
    json object | KubeObjectInterface | JSON undefined
    autoLogoutOnAuthError boolean true
    requestOptions Object {}

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:340


    put

    put(url, json, autoLogoutOnAuthError?, requestOptions?): Promise<any>

    Parameters

    Name Type Default value
    url string undefined
    json KubeObjectInterface undefined
    autoLogoutOnAuthError boolean true
    requestOptions Object {}

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:362


    remove

    remove(url, requestOptions?): Promise<any>

    Parameters

    Name Type
    url string
    requestOptions Object

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:373


    request

    request(path, params?, autoLogoutOnAuthError?, useCluster?): Promise<any>

    Parameters

    Name Type Default value
    path string undefined
    params RequestParams {}
    autoLogoutOnAuthError boolean true
    useCluster boolean true

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:27


    stream

    stream(url, cb, args): Object

    Parameters

    Name Type
    url string
    cb StreamResultsCb
    args StreamArgs

    Returns

    Object

    Name Type
    cancel () => void
    getSocket () => null | WebSocket

    Defined in

    lib/k8s/apiProxy.ts:512


    streamResult

    streamResult(url, name, cb, errCb): Promise<() => void>

    Parameters

    Name Type
    url string
    name string
    cb StreamResultsCb
    errCb StreamErrCb

    Returns

    Promise<() => void>

    Defined in

    lib/k8s/apiProxy.ts:378


    streamResults

    streamResults(url, cb, errCb): Promise<() => void>

    Parameters

    Name Type
    url string
    cb StreamResultsCb
    errCb StreamErrCb

    Returns

    Promise<() => void>

    Defined in

    lib/k8s/apiProxy.ts:415


    testAuth

    testAuth(): Promise<any>

    Returns

    Promise<any>

    Defined in

    lib/k8s/apiProxy.ts:673