File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed
examples-release-13/src/main/java/io/kubernetes/client/examples
examples-release-14/src/main/java/io/kubernetes/client/examples
examples-release-15/src/main/java/io/kubernetes/client/examples
util/src/main/java/io/kubernetes/client/informer Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,16 @@ public static void main(String[] args) throws Exception {
41
41
apiClient .getHttpClient ().newBuilder ().readTimeout (0 , TimeUnit .SECONDS ).build ();
42
42
apiClient .setHttpClient (httpClient );
43
43
44
- SharedInformerFactory factory = new SharedInformerFactory ();
44
+ SharedInformerFactory factory = new SharedInformerFactory (apiClient );
45
45
46
46
// Node informer
47
47
SharedIndexInformer <V1Node > nodeInformer =
48
48
factory .sharedIndexInformerFor (
49
49
(CallGeneratorParams params ) -> {
50
+ // **NOTE**:
51
+ // The following "CallGeneratorParams" lambda merely generates a stateless
52
+ // HTTPs requests, the effective apiClient is the one specified when constructing
53
+ // the informer-factory.
50
54
return coreV1Api .listNodeCall (
51
55
null ,
52
56
null ,
Original file line number Diff line number Diff line change @@ -41,12 +41,16 @@ public static void main(String[] args) throws Exception {
41
41
apiClient .getHttpClient ().newBuilder ().readTimeout (0 , TimeUnit .SECONDS ).build ();
42
42
apiClient .setHttpClient (httpClient );
43
43
44
- SharedInformerFactory factory = new SharedInformerFactory ();
44
+ SharedInformerFactory factory = new SharedInformerFactory (apiClient );
45
45
46
46
// Node informer
47
47
SharedIndexInformer <V1Node > nodeInformer =
48
48
factory .sharedIndexInformerFor (
49
49
(CallGeneratorParams params ) -> {
50
+ // **NOTE**:
51
+ // The following "CallGeneratorParams" lambda merely generates a stateless
52
+ // HTTPs requests, the effective apiClient is the one specified when constructing
53
+ // the informer-factory.
50
54
return coreV1Api .listNodeCall (
51
55
null ,
52
56
null ,
Original file line number Diff line number Diff line change @@ -41,11 +41,15 @@ public static void main(String[] args) throws Exception {
41
41
apiClient .getHttpClient ().newBuilder ().readTimeout (0 , TimeUnit .SECONDS ).build ();
42
42
apiClient .setHttpClient (httpClient );
43
43
44
- SharedInformerFactory factory = new SharedInformerFactory ();
44
+ SharedInformerFactory factory = new SharedInformerFactory (apiClient );
45
45
46
46
// Node informer
47
47
SharedIndexInformer <V1Node > nodeInformer =
48
48
factory .sharedIndexInformerFor (
49
+ // **NOTE**:
50
+ // The following "CallGeneratorParams" lambda merely generates a stateless
51
+ // HTTPs requests, the effective apiClient is the one specified when constructing
52
+ // the informer-factory.
49
53
(CallGeneratorParams params ) -> {
50
54
return coreV1Api .listNodeCall (
51
55
null ,
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ public class SharedInformerFactory {
49
49
private ApiClient apiClient ;
50
50
51
51
/** Constructor w/ default thread pool. */
52
+ /** DEPRECATE: In favor of explicit apiClient constructor to avoid misguiding */
53
+ @ Deprecated
52
54
public SharedInformerFactory () {
53
55
this (Configuration .getDefaultApiClient ().setReadTimeout (0 ), Executors .newCachedThreadPool ());
54
56
}
You can’t perform that action at this time.
0 commit comments