ntk-cms-api 20.26.8 → 20.26.9
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/fesm2022/ntk-cms-api.mjs
CHANGED
|
@@ -1813,20 +1813,28 @@ class CoreLogMicroServiceStatusService extends ApiCmsServerBase {
|
|
|
1813
1813
|
})
|
|
1814
1814
|
.pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1815
1815
|
}
|
|
1816
|
-
|
|
1816
|
+
/**
|
|
1817
|
+
* Ping - routeTarget: InstanceIdentifier_RuntimeIdentity برای نمونه خاص، InstanceIdentifier برای broadcast
|
|
1818
|
+
* هماهنگ با Core SendPingAndWaitForPongAsync: Core با routingKey = routeTarget پublish میکند
|
|
1819
|
+
*/
|
|
1820
|
+
ServicePing(routeTarget, timeoutSeconds = 15) {
|
|
1817
1821
|
const url = this.getBaseUrl() +
|
|
1818
1822
|
this.getModuleControllerUrl() +
|
|
1819
1823
|
'/Ping/' +
|
|
1820
|
-
encodeURIComponent(
|
|
1824
|
+
encodeURIComponent(routeTarget) +
|
|
1821
1825
|
'?timeoutSeconds=' +
|
|
1822
1826
|
timeoutSeconds;
|
|
1823
1827
|
return this.http.post(url, {}, { headers: this.getHeaders() }).pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1824
1828
|
}
|
|
1825
|
-
|
|
1829
|
+
/**
|
|
1830
|
+
* ارسال Command - routeTarget: InstanceIdentifier_RuntimeIdentity برای نمونه خاص، InstanceIdentifier برای broadcast
|
|
1831
|
+
* هماهنگ با Core SendCommand: Core با routingKey = routeTarget پublish میکند
|
|
1832
|
+
*/
|
|
1833
|
+
ServiceSendCommand(routeTarget, command) {
|
|
1826
1834
|
const url = this.getBaseUrl() +
|
|
1827
1835
|
this.getModuleControllerUrl() +
|
|
1828
1836
|
'/Command/' +
|
|
1829
|
-
encodeURIComponent(
|
|
1837
|
+
encodeURIComponent(routeTarget);
|
|
1830
1838
|
return this.http
|
|
1831
1839
|
.post(url, command || {}, { headers: this.getHeaders() })
|
|
1832
1840
|
.pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
@@ -3914,6 +3922,15 @@ class CoreLogTokenConnectionModel extends CoreTokenConnectionModel {
|
|
|
3914
3922
|
* مدل وضعیت میکروسرویس
|
|
3915
3923
|
*/
|
|
3916
3924
|
class CoreLogMicroServiceStatusModel extends BaseEntity {
|
|
3925
|
+
/**
|
|
3926
|
+
* هدف مسیریابی برای Ping و Command - InstanceIdentifier_RuntimeIdentity برای نمونه خاص، InstanceIdentifier برای broadcast
|
|
3927
|
+
*/
|
|
3928
|
+
get routeTarget() {
|
|
3929
|
+
if (this.instanceIdentifier && this.runtimeIdentity) {
|
|
3930
|
+
return this.instanceIdentifier + '_' + this.runtimeIdentity;
|
|
3931
|
+
}
|
|
3932
|
+
return this.instanceIdentifier || '';
|
|
3933
|
+
}
|
|
3917
3934
|
}
|
|
3918
3935
|
|
|
3919
3936
|
/**
|