@axinom/mosaic-db-common 0.31.0-rc.8 → 0.31.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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/monitoring/postgres-metrics.d.ts +1 -1
- package/dist/monitoring/postgres-metrics.js +3 -3
- package/package.json +2 -2
- package/src/index.ts +0 -1
- package/src/monitoring/postgres-metrics.ts +1 -1
- package/dist/pg-types-extension.d.ts +0 -7
- package/dist/pg-types-extension.d.ts.map +0 -1
- package/dist/pg-types-extension.js +0 -4
- package/dist/pg-types-extension.js.map +0 -1
- package/src/pg-types-extension.ts +0 -9
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ __exportStar(require("./messaging"), exports);
|
|
|
22
22
|
__exportStar(require("./middleware"), exports);
|
|
23
23
|
__exportStar(require("./migrations"), exports);
|
|
24
24
|
__exportStar(require("./monitoring"), exports);
|
|
25
|
-
__exportStar(require("./pg-types-extension"), exports);
|
|
26
25
|
__exportStar(require("./replication"), exports);
|
|
27
26
|
__exportStar(require("./zapatos"), exports);
|
|
28
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAC9B,4CAA0B"}
|
|
@@ -10,5 +10,5 @@ import { Metric } from 'prom-client';
|
|
|
10
10
|
* @param timeoutInMilliSeconds The maximum time the connectivity check will run during metric collection. Defaults to `1000ms`.
|
|
11
11
|
* @returns A `Gauge` metric with a name `ax_postgres_<pgPoolType>_connectivity`.
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const createPostgresPoolConnectivityMetric: (pgPool: Pool, pgPoolType: 'dbOwnerPool' | 'envOwnerPool' | 'loginPool', timeoutInMilliSeconds?: number) => Metric<string>;
|
|
14
14
|
//# sourceMappingURL=postgres-metrics.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createPostgresPoolConnectivityMetric = void 0;
|
|
4
4
|
const prom_client_1 = require("prom-client");
|
|
5
5
|
const createTimeout = (timeoutInMilliSeconds) => new Promise((_, reject) => setTimeout(() => reject(), timeoutInMilliSeconds));
|
|
6
6
|
/**
|
|
@@ -13,7 +13,7 @@ const createTimeout = (timeoutInMilliSeconds) => new Promise((_, reject) => setT
|
|
|
13
13
|
* @param timeoutInMilliSeconds The maximum time the connectivity check will run during metric collection. Defaults to `1000ms`.
|
|
14
14
|
* @returns A `Gauge` metric with a name `ax_postgres_<pgPoolType>_connectivity`.
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const createPostgresPoolConnectivityMetric = (pgPool, pgPoolType, timeoutInMilliSeconds = 1000) => {
|
|
17
17
|
return new prom_client_1.Gauge({
|
|
18
18
|
name: `ax_postgres_${pgPoolType}_connectivity`,
|
|
19
19
|
help: `Connection status from the service to the database via the ${pgPoolType}`,
|
|
@@ -31,5 +31,5 @@ const CreatePostgresPoolConnectivityMetric = (pgPool, pgPoolType, timeoutInMilli
|
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
exports.
|
|
34
|
+
exports.createPostgresPoolConnectivityMetric = createPostgresPoolConnectivityMetric;
|
|
35
35
|
//# sourceMappingURL=postgres-metrics.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-db-common",
|
|
3
|
-
"version": "0.31.0
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "This library encapsulates database-related functionality to develop Mosaic based services.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "e583a1076964626d1d0b1f9fb507d1defc307102"
|
|
56
56
|
}
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ const createTimeout = (timeoutInMilliSeconds: number): Promise<void> =>
|
|
|
16
16
|
* @param timeoutInMilliSeconds The maximum time the connectivity check will run during metric collection. Defaults to `1000ms`.
|
|
17
17
|
* @returns A `Gauge` metric with a name `ax_postgres_<pgPoolType>_connectivity`.
|
|
18
18
|
*/
|
|
19
|
-
export const
|
|
19
|
+
export const createPostgresPoolConnectivityMetric = (
|
|
20
20
|
pgPool: Pool,
|
|
21
21
|
pgPoolType: 'dbOwnerPool' | 'envOwnerPool' | 'loginPool',
|
|
22
22
|
timeoutInMilliSeconds = 1000,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pg-types-extension.d.ts","sourceRoot":"","sources":["../src/pg-types-extension.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,CAAC;AAIZ,OAAO,QAAQ,IAAI,CAAC;IAClB,UAAU,YAAY;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pg-types-extension.js","sourceRoot":"","sources":["../src/pg-types-extension.ts"],"names":[],"mappings":";;AAAA,cAAY"}
|