oci-opsi 2.98.1 → 2.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.d.ts +5 -0
- package/lib/client.js +11 -0
- package/lib/client.js.map +1 -1
- package/package.json +3 -3
package/lib/client.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export declare class OperationsInsightsClient {
|
|
|
39
39
|
protected "_region": common.Region;
|
|
40
40
|
protected _lastSetRegionOrRegionId: string;
|
|
41
41
|
protected _httpClient: common.HttpClient;
|
|
42
|
+
protected _authProvider: common.AuthenticationDetailsProvider | undefined;
|
|
42
43
|
constructor(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration);
|
|
43
44
|
/**
|
|
44
45
|
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
@@ -88,6 +89,10 @@ export declare class OperationsInsightsClient {
|
|
|
88
89
|
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
89
90
|
*/
|
|
90
91
|
shutdownCircuitBreaker(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
94
|
+
*/
|
|
95
|
+
closeProvider(): void;
|
|
91
96
|
/**
|
|
92
97
|
* Close the client once it is no longer needed
|
|
93
98
|
*/
|
package/lib/client.js
CHANGED
|
@@ -72,6 +72,7 @@ class OperationsInsightsClient {
|
|
|
72
72
|
const requestSigner = params.authenticationDetailsProvider
|
|
73
73
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
74
74
|
: null;
|
|
75
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
75
76
|
if (clientConfiguration) {
|
|
76
77
|
this._clientConfiguration = clientConfiguration;
|
|
77
78
|
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
@@ -193,11 +194,21 @@ class OperationsInsightsClient {
|
|
|
193
194
|
this._circuitBreaker.shutdown();
|
|
194
195
|
}
|
|
195
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
199
|
+
*/
|
|
200
|
+
closeProvider() {
|
|
201
|
+
if (this._authProvider) {
|
|
202
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
203
|
+
(this._authProvider).closeProvider();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
196
206
|
/**
|
|
197
207
|
* Close the client once it is no longer needed
|
|
198
208
|
*/
|
|
199
209
|
close() {
|
|
200
210
|
this.shutdownCircuitBreaker();
|
|
211
|
+
this.closeProvider();
|
|
201
212
|
}
|
|
202
213
|
/**
|
|
203
214
|
* Add new members (e.g. databases and hosts) to an Exadata system in Operations Insights. Exadata-related metric collection and analysis will be started.
|