File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,21 @@ export class ListWatch<T extends KubernetesObject> implements ObjectCache<T>, In
34
34
private readonly watch : Watch ;
35
35
private readonly listFn : ListPromise < T > ;
36
36
private readonly labelSelector ?: string ;
37
+ private readonly fieldSelector ?: string ;
37
38
38
39
public constructor (
39
40
path : string ,
40
41
watch : Watch ,
41
42
listFn : ListPromise < T > ,
42
43
autoStart : boolean = true ,
43
44
labelSelector ?: string ,
45
+ fieldSelector ?: string ,
44
46
) {
45
47
this . path = path ;
46
48
this . watch = watch ;
47
49
this . listFn = listFn ;
48
50
this . labelSelector = labelSelector ;
51
+ this . fieldSelector = fieldSelector ;
49
52
50
53
this . callbackCache [ ADD ] = [ ] ;
51
54
this . callbackCache [ UPDATE ] = [ ] ;
@@ -172,10 +175,14 @@ export class ListWatch<T extends KubernetesObject> implements ObjectCache<T>, In
172
175
} as {
173
176
resourceVersion : string | undefined ;
174
177
labelSelector : string | undefined ;
178
+ fieldSelector : string | undefined ;
175
179
} ;
176
180
if ( this . labelSelector !== undefined ) {
177
181
queryParams . labelSelector = ObjectSerializer . serialize ( this . labelSelector , 'string' ) ;
178
182
}
183
+ if ( this . fieldSelector !== undefined ) {
184
+ queryParams . fieldSelector = ObjectSerializer . serialize ( this . fieldSelector , 'string' ) ;
185
+ }
179
186
this . request = await this . watch . watch (
180
187
this . path ,
181
188
queryParams ,
You can’t perform that action at this time.
0 commit comments