Skip to main content

Function: withApiVersion()

function withApiVersion<C>(resourceClass: C, apiVersion: string): C;

Defined in: lib/k8s/schedulingApis.ts:157

The class with its API version fixed to one of the versions it declares.

A list resolves one endpoint for every cluster it is given, by racing the declared versions against the first of them, so clusters on different versions can only be listed together once each list is held to a single version.

Type Parameters​

Type Parameter
C extends typeof KubeObject

Parameters​

ParameterTypeDescription
resourceClassCThe class to fix the version of.
apiVersionstringOne of the versions the class declares.

Returns​

C

A subclass that declares only that version, the same one on every call.