@reyemtech/nimbus 0.1.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/LICENSE +21 -0
- package/README.md +399 -0
- package/dist/cjs/aws/cluster.d.ts +32 -0
- package/dist/cjs/aws/cluster.d.ts.map +1 -0
- package/dist/cjs/aws/cluster.js +214 -0
- package/dist/cjs/aws/cluster.js.map +1 -0
- package/dist/cjs/aws/dns.d.ts +22 -0
- package/dist/cjs/aws/dns.d.ts.map +1 -0
- package/dist/cjs/aws/dns.js +95 -0
- package/dist/cjs/aws/dns.js.map +1 -0
- package/dist/cjs/aws/index.d.ts +10 -0
- package/dist/cjs/aws/index.d.ts.map +1 -0
- package/dist/cjs/aws/index.js +17 -0
- package/dist/cjs/aws/index.js.map +1 -0
- package/dist/cjs/aws/network.d.ts +27 -0
- package/dist/cjs/aws/network.d.ts.map +1 -0
- package/dist/cjs/aws/network.js +262 -0
- package/dist/cjs/aws/network.js.map +1 -0
- package/dist/cjs/aws/secrets.d.ts +26 -0
- package/dist/cjs/aws/secrets.d.ts.map +1 -0
- package/dist/cjs/aws/secrets.js +127 -0
- package/dist/cjs/aws/secrets.js.map +1 -0
- package/dist/cjs/azure/cluster.d.ts +44 -0
- package/dist/cjs/azure/cluster.d.ts.map +1 -0
- package/dist/cjs/azure/cluster.js +143 -0
- package/dist/cjs/azure/cluster.js.map +1 -0
- package/dist/cjs/azure/dns.d.ts +28 -0
- package/dist/cjs/azure/dns.d.ts.map +1 -0
- package/dist/cjs/azure/dns.js +169 -0
- package/dist/cjs/azure/dns.js.map +1 -0
- package/dist/cjs/azure/index.d.ts +10 -0
- package/dist/cjs/azure/index.d.ts.map +1 -0
- package/dist/cjs/azure/index.js +17 -0
- package/dist/cjs/azure/index.js.map +1 -0
- package/dist/cjs/azure/network.d.ts +28 -0
- package/dist/cjs/azure/network.d.ts.map +1 -0
- package/dist/cjs/azure/network.js +176 -0
- package/dist/cjs/azure/network.js.map +1 -0
- package/dist/cjs/azure/secrets.d.ts +37 -0
- package/dist/cjs/azure/secrets.d.ts.map +1 -0
- package/dist/cjs/azure/secrets.js +150 -0
- package/dist/cjs/azure/secrets.js.map +1 -0
- package/dist/cjs/cache/index.d.ts +7 -0
- package/dist/cjs/cache/index.d.ts.map +1 -0
- package/dist/cjs/cache/index.js +8 -0
- package/dist/cjs/cache/index.js.map +1 -0
- package/dist/cjs/cache/interfaces.d.ts +60 -0
- package/dist/cjs/cache/interfaces.d.ts.map +1 -0
- package/dist/cjs/cache/interfaces.js +11 -0
- package/dist/cjs/cache/interfaces.js.map +1 -0
- package/dist/cjs/cluster/index.d.ts +7 -0
- package/dist/cjs/cluster/index.d.ts.map +1 -0
- package/dist/cjs/cluster/index.js +8 -0
- package/dist/cjs/cluster/index.js.map +1 -0
- package/dist/cjs/cluster/interfaces.d.ts +120 -0
- package/dist/cjs/cluster/interfaces.d.ts.map +1 -0
- package/dist/cjs/cluster/interfaces.js +12 -0
- package/dist/cjs/cluster/interfaces.js.map +1 -0
- package/dist/cjs/database/index.d.ts +7 -0
- package/dist/cjs/database/index.d.ts.map +1 -0
- package/dist/cjs/database/index.js +8 -0
- package/dist/cjs/database/index.js.map +1 -0
- package/dist/cjs/database/interfaces.d.ts +93 -0
- package/dist/cjs/database/interfaces.d.ts.map +1 -0
- package/dist/cjs/database/interfaces.js +12 -0
- package/dist/cjs/database/interfaces.js.map +1 -0
- package/dist/cjs/dns/index.d.ts +7 -0
- package/dist/cjs/dns/index.d.ts.map +1 -0
- package/dist/cjs/dns/index.js +8 -0
- package/dist/cjs/dns/index.js.map +1 -0
- package/dist/cjs/dns/interfaces.d.ts +55 -0
- package/dist/cjs/dns/interfaces.d.ts.map +1 -0
- package/dist/cjs/dns/interfaces.js +11 -0
- package/dist/cjs/dns/interfaces.js.map +1 -0
- package/dist/cjs/factories/cluster.d.ts +45 -0
- package/dist/cjs/factories/cluster.d.ts.map +1 -0
- package/dist/cjs/factories/cluster.js +90 -0
- package/dist/cjs/factories/cluster.js.map +1 -0
- package/dist/cjs/factories/dns.d.ts +30 -0
- package/dist/cjs/factories/dns.d.ts.map +1 -0
- package/dist/cjs/factories/dns.js +56 -0
- package/dist/cjs/factories/dns.js.map +1 -0
- package/dist/cjs/factories/index.d.ts +15 -0
- package/dist/cjs/factories/index.d.ts.map +1 -0
- package/dist/cjs/factories/index.js +23 -0
- package/dist/cjs/factories/index.js.map +1 -0
- package/dist/cjs/factories/network.d.ts +40 -0
- package/dist/cjs/factories/network.d.ts.map +1 -0
- package/dist/cjs/factories/network.js +85 -0
- package/dist/cjs/factories/network.js.map +1 -0
- package/dist/cjs/factories/secrets.d.ts +38 -0
- package/dist/cjs/factories/secrets.d.ts.map +1 -0
- package/dist/cjs/factories/secrets.js +67 -0
- package/dist/cjs/factories/secrets.js.map +1 -0
- package/dist/cjs/factories/types.d.ts +75 -0
- package/dist/cjs/factories/types.d.ts.map +1 -0
- package/dist/cjs/factories/types.js +28 -0
- package/dist/cjs/factories/types.js.map +1 -0
- package/dist/cjs/global-lb/glb.d.ts +29 -0
- package/dist/cjs/global-lb/glb.d.ts.map +1 -0
- package/dist/cjs/global-lb/glb.js +220 -0
- package/dist/cjs/global-lb/glb.js.map +1 -0
- package/dist/cjs/global-lb/index.d.ts +8 -0
- package/dist/cjs/global-lb/index.d.ts.map +1 -0
- package/dist/cjs/global-lb/index.js +11 -0
- package/dist/cjs/global-lb/index.js.map +1 -0
- package/dist/cjs/global-lb/interfaces.d.ts +62 -0
- package/dist/cjs/global-lb/interfaces.d.ts.map +1 -0
- package/dist/cjs/global-lb/interfaces.js +11 -0
- package/dist/cjs/global-lb/interfaces.js.map +1 -0
- package/dist/cjs/index.d.ts +28 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +72 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/network/cidr.d.ts +92 -0
- package/dist/cjs/network/cidr.d.ts.map +1 -0
- package/dist/cjs/network/cidr.js +189 -0
- package/dist/cjs/network/cidr.js.map +1 -0
- package/dist/cjs/network/index.d.ts +8 -0
- package/dist/cjs/network/index.d.ts.map +1 -0
- package/dist/cjs/network/index.js +17 -0
- package/dist/cjs/network/index.js.map +1 -0
- package/dist/cjs/network/interfaces.d.ts +60 -0
- package/dist/cjs/network/interfaces.d.ts.map +1 -0
- package/dist/cjs/network/interfaces.js +12 -0
- package/dist/cjs/network/interfaces.js.map +1 -0
- package/dist/cjs/platform/index.d.ts +8 -0
- package/dist/cjs/platform/index.d.ts.map +1 -0
- package/dist/cjs/platform/index.js +11 -0
- package/dist/cjs/platform/index.js.map +1 -0
- package/dist/cjs/platform/interfaces.d.ts +86 -0
- package/dist/cjs/platform/interfaces.d.ts.map +1 -0
- package/dist/cjs/platform/interfaces.js +12 -0
- package/dist/cjs/platform/interfaces.js.map +1 -0
- package/dist/cjs/platform/stack.d.ts +32 -0
- package/dist/cjs/platform/stack.d.ts.map +1 -0
- package/dist/cjs/platform/stack.js +258 -0
- package/dist/cjs/platform/stack.js.map +1 -0
- package/dist/cjs/queue/index.d.ts +7 -0
- package/dist/cjs/queue/index.d.ts.map +1 -0
- package/dist/cjs/queue/index.js +8 -0
- package/dist/cjs/queue/index.js.map +1 -0
- package/dist/cjs/queue/interfaces.d.ts +46 -0
- package/dist/cjs/queue/interfaces.d.ts.map +1 -0
- package/dist/cjs/queue/interfaces.js +11 -0
- package/dist/cjs/queue/interfaces.js.map +1 -0
- package/dist/cjs/secrets/index.d.ts +7 -0
- package/dist/cjs/secrets/index.d.ts.map +1 -0
- package/dist/cjs/secrets/index.js +8 -0
- package/dist/cjs/secrets/index.js.map +1 -0
- package/dist/cjs/secrets/interfaces.d.ts +73 -0
- package/dist/cjs/secrets/interfaces.d.ts.map +1 -0
- package/dist/cjs/secrets/interfaces.js +11 -0
- package/dist/cjs/secrets/interfaces.js.map +1 -0
- package/dist/cjs/storage/index.d.ts +7 -0
- package/dist/cjs/storage/index.d.ts.map +1 -0
- package/dist/cjs/storage/index.js +8 -0
- package/dist/cjs/storage/index.js.map +1 -0
- package/dist/cjs/storage/interfaces.d.ts +63 -0
- package/dist/cjs/storage/interfaces.d.ts.map +1 -0
- package/dist/cjs/storage/interfaces.js +11 -0
- package/dist/cjs/storage/interfaces.js.map +1 -0
- package/dist/cjs/types/cloud-target.d.ts +89 -0
- package/dist/cjs/types/cloud-target.d.ts.map +1 -0
- package/dist/cjs/types/cloud-target.js +73 -0
- package/dist/cjs/types/cloud-target.js.map +1 -0
- package/dist/cjs/types/errors.d.ts +96 -0
- package/dist/cjs/types/errors.d.ts.map +1 -0
- package/dist/cjs/types/errors.js +127 -0
- package/dist/cjs/types/errors.js.map +1 -0
- package/dist/cjs/types/index.d.ts +10 -0
- package/dist/cjs/types/index.d.ts.map +1 -0
- package/dist/cjs/types/index.js +33 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/tags.d.ts +53 -0
- package/dist/cjs/types/tags.d.ts.map +1 -0
- package/dist/cjs/types/tags.js +110 -0
- package/dist/cjs/types/tags.js.map +1 -0
- package/dist/cjs/types/validation.d.ts +63 -0
- package/dist/cjs/types/validation.d.ts.map +1 -0
- package/dist/cjs/types/validation.js +158 -0
- package/dist/cjs/types/validation.js.map +1 -0
- package/dist/esm/aws/cluster.d.ts +32 -0
- package/dist/esm/aws/cluster.d.ts.map +1 -0
- package/dist/esm/aws/cluster.js +214 -0
- package/dist/esm/aws/cluster.js.map +1 -0
- package/dist/esm/aws/dns.d.ts +22 -0
- package/dist/esm/aws/dns.d.ts.map +1 -0
- package/dist/esm/aws/dns.js +95 -0
- package/dist/esm/aws/dns.js.map +1 -0
- package/dist/esm/aws/index.d.ts +10 -0
- package/dist/esm/aws/index.d.ts.map +1 -0
- package/dist/esm/aws/index.js +17 -0
- package/dist/esm/aws/index.js.map +1 -0
- package/dist/esm/aws/network.d.ts +27 -0
- package/dist/esm/aws/network.d.ts.map +1 -0
- package/dist/esm/aws/network.js +262 -0
- package/dist/esm/aws/network.js.map +1 -0
- package/dist/esm/aws/secrets.d.ts +26 -0
- package/dist/esm/aws/secrets.d.ts.map +1 -0
- package/dist/esm/aws/secrets.js +127 -0
- package/dist/esm/aws/secrets.js.map +1 -0
- package/dist/esm/azure/cluster.d.ts +44 -0
- package/dist/esm/azure/cluster.d.ts.map +1 -0
- package/dist/esm/azure/cluster.js +143 -0
- package/dist/esm/azure/cluster.js.map +1 -0
- package/dist/esm/azure/dns.d.ts +28 -0
- package/dist/esm/azure/dns.d.ts.map +1 -0
- package/dist/esm/azure/dns.js +169 -0
- package/dist/esm/azure/dns.js.map +1 -0
- package/dist/esm/azure/index.d.ts +10 -0
- package/dist/esm/azure/index.d.ts.map +1 -0
- package/dist/esm/azure/index.js +17 -0
- package/dist/esm/azure/index.js.map +1 -0
- package/dist/esm/azure/network.d.ts +28 -0
- package/dist/esm/azure/network.d.ts.map +1 -0
- package/dist/esm/azure/network.js +176 -0
- package/dist/esm/azure/network.js.map +1 -0
- package/dist/esm/azure/secrets.d.ts +37 -0
- package/dist/esm/azure/secrets.d.ts.map +1 -0
- package/dist/esm/azure/secrets.js +150 -0
- package/dist/esm/azure/secrets.js.map +1 -0
- package/dist/esm/cache/index.d.ts +7 -0
- package/dist/esm/cache/index.d.ts.map +1 -0
- package/dist/esm/cache/index.js +8 -0
- package/dist/esm/cache/index.js.map +1 -0
- package/dist/esm/cache/interfaces.d.ts +60 -0
- package/dist/esm/cache/interfaces.d.ts.map +1 -0
- package/dist/esm/cache/interfaces.js +11 -0
- package/dist/esm/cache/interfaces.js.map +1 -0
- package/dist/esm/cluster/index.d.ts +7 -0
- package/dist/esm/cluster/index.d.ts.map +1 -0
- package/dist/esm/cluster/index.js +8 -0
- package/dist/esm/cluster/index.js.map +1 -0
- package/dist/esm/cluster/interfaces.d.ts +120 -0
- package/dist/esm/cluster/interfaces.d.ts.map +1 -0
- package/dist/esm/cluster/interfaces.js +12 -0
- package/dist/esm/cluster/interfaces.js.map +1 -0
- package/dist/esm/database/index.d.ts +7 -0
- package/dist/esm/database/index.d.ts.map +1 -0
- package/dist/esm/database/index.js +8 -0
- package/dist/esm/database/index.js.map +1 -0
- package/dist/esm/database/interfaces.d.ts +93 -0
- package/dist/esm/database/interfaces.d.ts.map +1 -0
- package/dist/esm/database/interfaces.js +12 -0
- package/dist/esm/database/interfaces.js.map +1 -0
- package/dist/esm/dns/index.d.ts +7 -0
- package/dist/esm/dns/index.d.ts.map +1 -0
- package/dist/esm/dns/index.js +8 -0
- package/dist/esm/dns/index.js.map +1 -0
- package/dist/esm/dns/interfaces.d.ts +55 -0
- package/dist/esm/dns/interfaces.d.ts.map +1 -0
- package/dist/esm/dns/interfaces.js +11 -0
- package/dist/esm/dns/interfaces.js.map +1 -0
- package/dist/esm/factories/cluster.d.ts +45 -0
- package/dist/esm/factories/cluster.d.ts.map +1 -0
- package/dist/esm/factories/cluster.js +90 -0
- package/dist/esm/factories/cluster.js.map +1 -0
- package/dist/esm/factories/dns.d.ts +30 -0
- package/dist/esm/factories/dns.d.ts.map +1 -0
- package/dist/esm/factories/dns.js +56 -0
- package/dist/esm/factories/dns.js.map +1 -0
- package/dist/esm/factories/index.d.ts +15 -0
- package/dist/esm/factories/index.d.ts.map +1 -0
- package/dist/esm/factories/index.js +23 -0
- package/dist/esm/factories/index.js.map +1 -0
- package/dist/esm/factories/network.d.ts +40 -0
- package/dist/esm/factories/network.d.ts.map +1 -0
- package/dist/esm/factories/network.js +85 -0
- package/dist/esm/factories/network.js.map +1 -0
- package/dist/esm/factories/secrets.d.ts +38 -0
- package/dist/esm/factories/secrets.d.ts.map +1 -0
- package/dist/esm/factories/secrets.js +67 -0
- package/dist/esm/factories/secrets.js.map +1 -0
- package/dist/esm/factories/types.d.ts +75 -0
- package/dist/esm/factories/types.d.ts.map +1 -0
- package/dist/esm/factories/types.js +28 -0
- package/dist/esm/factories/types.js.map +1 -0
- package/dist/esm/global-lb/glb.d.ts +29 -0
- package/dist/esm/global-lb/glb.d.ts.map +1 -0
- package/dist/esm/global-lb/glb.js +220 -0
- package/dist/esm/global-lb/glb.js.map +1 -0
- package/dist/esm/global-lb/index.d.ts +8 -0
- package/dist/esm/global-lb/index.d.ts.map +1 -0
- package/dist/esm/global-lb/index.js +11 -0
- package/dist/esm/global-lb/index.js.map +1 -0
- package/dist/esm/global-lb/interfaces.d.ts +62 -0
- package/dist/esm/global-lb/interfaces.d.ts.map +1 -0
- package/dist/esm/global-lb/interfaces.js +11 -0
- package/dist/esm/global-lb/interfaces.js.map +1 -0
- package/dist/esm/index.d.ts +28 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +72 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/network/cidr.d.ts +92 -0
- package/dist/esm/network/cidr.d.ts.map +1 -0
- package/dist/esm/network/cidr.js +189 -0
- package/dist/esm/network/cidr.js.map +1 -0
- package/dist/esm/network/index.d.ts +8 -0
- package/dist/esm/network/index.d.ts.map +1 -0
- package/dist/esm/network/index.js +17 -0
- package/dist/esm/network/index.js.map +1 -0
- package/dist/esm/network/interfaces.d.ts +60 -0
- package/dist/esm/network/interfaces.d.ts.map +1 -0
- package/dist/esm/network/interfaces.js +12 -0
- package/dist/esm/network/interfaces.js.map +1 -0
- package/dist/esm/platform/index.d.ts +8 -0
- package/dist/esm/platform/index.d.ts.map +1 -0
- package/dist/esm/platform/index.js +11 -0
- package/dist/esm/platform/index.js.map +1 -0
- package/dist/esm/platform/interfaces.d.ts +86 -0
- package/dist/esm/platform/interfaces.d.ts.map +1 -0
- package/dist/esm/platform/interfaces.js +12 -0
- package/dist/esm/platform/interfaces.js.map +1 -0
- package/dist/esm/platform/stack.d.ts +32 -0
- package/dist/esm/platform/stack.d.ts.map +1 -0
- package/dist/esm/platform/stack.js +258 -0
- package/dist/esm/platform/stack.js.map +1 -0
- package/dist/esm/queue/index.d.ts +7 -0
- package/dist/esm/queue/index.d.ts.map +1 -0
- package/dist/esm/queue/index.js +8 -0
- package/dist/esm/queue/index.js.map +1 -0
- package/dist/esm/queue/interfaces.d.ts +46 -0
- package/dist/esm/queue/interfaces.d.ts.map +1 -0
- package/dist/esm/queue/interfaces.js +11 -0
- package/dist/esm/queue/interfaces.js.map +1 -0
- package/dist/esm/secrets/index.d.ts +7 -0
- package/dist/esm/secrets/index.d.ts.map +1 -0
- package/dist/esm/secrets/index.js +8 -0
- package/dist/esm/secrets/index.js.map +1 -0
- package/dist/esm/secrets/interfaces.d.ts +73 -0
- package/dist/esm/secrets/interfaces.d.ts.map +1 -0
- package/dist/esm/secrets/interfaces.js +11 -0
- package/dist/esm/secrets/interfaces.js.map +1 -0
- package/dist/esm/storage/index.d.ts +7 -0
- package/dist/esm/storage/index.d.ts.map +1 -0
- package/dist/esm/storage/index.js +8 -0
- package/dist/esm/storage/index.js.map +1 -0
- package/dist/esm/storage/interfaces.d.ts +63 -0
- package/dist/esm/storage/interfaces.d.ts.map +1 -0
- package/dist/esm/storage/interfaces.js +11 -0
- package/dist/esm/storage/interfaces.js.map +1 -0
- package/dist/esm/types/cloud-target.d.ts +89 -0
- package/dist/esm/types/cloud-target.d.ts.map +1 -0
- package/dist/esm/types/cloud-target.js +73 -0
- package/dist/esm/types/cloud-target.js.map +1 -0
- package/dist/esm/types/errors.d.ts +96 -0
- package/dist/esm/types/errors.d.ts.map +1 -0
- package/dist/esm/types/errors.js +127 -0
- package/dist/esm/types/errors.js.map +1 -0
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +33 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/tags.d.ts +53 -0
- package/dist/esm/types/tags.d.ts.map +1 -0
- package/dist/esm/types/tags.js +110 -0
- package/dist/esm/types/tags.js.map +1 -0
- package/dist/esm/types/validation.d.ts +63 -0
- package/dist/esm/types/validation.d.ts.map +1 -0
- package/dist/esm/types/validation.js +158 -0
- package/dist/esm/types/validation.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global Load Balancer implementation.
|
|
4
|
+
*
|
|
5
|
+
* Routes traffic across multiple clusters using DNS-based health checks.
|
|
6
|
+
* Currently supports Route53 as the DNS provider. Azure Traffic Manager
|
|
7
|
+
* and Cloudflare can be added as future providers.
|
|
8
|
+
*
|
|
9
|
+
* @module global-lb/glb
|
|
10
|
+
*/
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
+
var ownKeys = function(o) {
|
|
29
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
+
var ar = [];
|
|
31
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
+
return ar;
|
|
33
|
+
};
|
|
34
|
+
return ownKeys(o);
|
|
35
|
+
};
|
|
36
|
+
return function (mod) {
|
|
37
|
+
if (mod && mod.__esModule) return mod;
|
|
38
|
+
var result = {};
|
|
39
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
+
__setModuleDefault(result, mod);
|
|
41
|
+
return result;
|
|
42
|
+
};
|
|
43
|
+
})();
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.createGlobalLoadBalancer = createGlobalLoadBalancer;
|
|
46
|
+
const aws = __importStar(require("@pulumi/aws"));
|
|
47
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
48
|
+
/**
|
|
49
|
+
* Create a Global Load Balancer across multiple clusters.
|
|
50
|
+
*
|
|
51
|
+
* Uses DNS-based routing with health checks to distribute traffic.
|
|
52
|
+
* Supports active-active, active-passive, and geo-routing strategies.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* const glb = createGlobalLoadBalancer("prod", {
|
|
57
|
+
* strategy: "active-active",
|
|
58
|
+
* clusters: [awsCluster, azureCluster],
|
|
59
|
+
* domain: "app.example.com",
|
|
60
|
+
* healthCheck: { path: "/health", port: 443, protocol: "HTTPS" },
|
|
61
|
+
* dnsProvider: "route53",
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
function createGlobalLoadBalancer(name, config) {
|
|
66
|
+
switch (config.dnsProvider) {
|
|
67
|
+
case "route53":
|
|
68
|
+
return createRoute53Glb(name, config);
|
|
69
|
+
case "cloudflare":
|
|
70
|
+
case "azure-traffic-manager":
|
|
71
|
+
// Placeholder for future providers
|
|
72
|
+
return createRoute53Glb(name, config);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function createRoute53Glb(name, config) {
|
|
76
|
+
const hc = config.healthCheck;
|
|
77
|
+
// Create a hosted zone for the GLB domain (or reference existing)
|
|
78
|
+
const domainParts = config.domain.split(".");
|
|
79
|
+
const zoneDomain = domainParts.slice(-2).join(".");
|
|
80
|
+
const zone = aws.route53.getZoneOutput({ name: zoneDomain });
|
|
81
|
+
// Create health checks for each cluster
|
|
82
|
+
const healthChecks = config.clusters.map((cluster, i) => {
|
|
83
|
+
const healthCheck = new aws.route53.HealthCheck(`${name}-hc-${i}`, {
|
|
84
|
+
type: hc.protocol === "TCP" ? "TCP" : `${hc.protocol}_STR_MATCH`,
|
|
85
|
+
resourcePath: hc.protocol !== "TCP" ? hc.path : undefined,
|
|
86
|
+
port: hc.port,
|
|
87
|
+
requestInterval: hc.intervalSeconds ?? 30,
|
|
88
|
+
failureThreshold: hc.unhealthyThreshold ?? 3,
|
|
89
|
+
fqdn: cluster.endpoint.apply((ep) => {
|
|
90
|
+
try {
|
|
91
|
+
return new URL(ep).hostname;
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return ep;
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
searchString: hc.protocol !== "TCP" ? "ok" : undefined,
|
|
98
|
+
tags: { Name: `${name}-hc-${cluster.name}` },
|
|
99
|
+
});
|
|
100
|
+
return { cluster, healthCheck };
|
|
101
|
+
});
|
|
102
|
+
// Create DNS records based on routing strategy
|
|
103
|
+
switch (config.strategy) {
|
|
104
|
+
case "active-active": {
|
|
105
|
+
// Weighted routing — equal weight across all clusters
|
|
106
|
+
for (const [i, entry] of healthChecks.entries()) {
|
|
107
|
+
new aws.route53.Record(`${name}-record-${i}`, {
|
|
108
|
+
zoneId: zone.zoneId,
|
|
109
|
+
name: config.domain,
|
|
110
|
+
type: "CNAME",
|
|
111
|
+
ttl: 60,
|
|
112
|
+
setIdentifier: `${name}-${entry.cluster.name}`,
|
|
113
|
+
weightedRoutingPolicies: [{ weight: 100 }],
|
|
114
|
+
healthCheckId: entry.healthCheck.id,
|
|
115
|
+
records: [
|
|
116
|
+
entry.cluster.endpoint.apply((ep) => {
|
|
117
|
+
try {
|
|
118
|
+
return new URL(ep).hostname;
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return ep;
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
],
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case "active-passive": {
|
|
130
|
+
// Failover routing — primary + secondary
|
|
131
|
+
for (const [i, entry] of healthChecks.entries()) {
|
|
132
|
+
new aws.route53.Record(`${name}-record-${i}`, {
|
|
133
|
+
zoneId: zone.zoneId,
|
|
134
|
+
name: config.domain,
|
|
135
|
+
type: "CNAME",
|
|
136
|
+
ttl: 60,
|
|
137
|
+
setIdentifier: `${name}-${entry.cluster.name}`,
|
|
138
|
+
failoverRoutingPolicies: [{ type: i === 0 ? "PRIMARY" : "SECONDARY" }],
|
|
139
|
+
healthCheckId: entry.healthCheck.id,
|
|
140
|
+
records: [
|
|
141
|
+
entry.cluster.endpoint.apply((ep) => {
|
|
142
|
+
try {
|
|
143
|
+
return new URL(ep).hostname;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return ep;
|
|
147
|
+
}
|
|
148
|
+
}),
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
case "geo": {
|
|
155
|
+
// Geolocation routing — defaults to continent-based
|
|
156
|
+
const continents = ["NA", "EU", "AP", "SA", "AF", "OC"];
|
|
157
|
+
for (const [i, entry] of healthChecks.entries()) {
|
|
158
|
+
new aws.route53.Record(`${name}-record-${i}`, {
|
|
159
|
+
zoneId: zone.zoneId,
|
|
160
|
+
name: config.domain,
|
|
161
|
+
type: "CNAME",
|
|
162
|
+
ttl: 60,
|
|
163
|
+
setIdentifier: `${name}-${entry.cluster.name}`,
|
|
164
|
+
geolocationRoutingPolicies: [
|
|
165
|
+
i < continents.length ? { continent: continents[i] } : { country: "*" },
|
|
166
|
+
],
|
|
167
|
+
healthCheckId: entry.healthCheck.id,
|
|
168
|
+
records: [
|
|
169
|
+
entry.cluster.endpoint.apply((ep) => {
|
|
170
|
+
try {
|
|
171
|
+
return new URL(ep).hostname;
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return ep;
|
|
175
|
+
}
|
|
176
|
+
}),
|
|
177
|
+
],
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
// Default fallback record
|
|
181
|
+
if (healthChecks.length > 0) {
|
|
182
|
+
const fallback = healthChecks[0];
|
|
183
|
+
if (fallback) {
|
|
184
|
+
new aws.route53.Record(`${name}-record-default`, {
|
|
185
|
+
zoneId: zone.zoneId,
|
|
186
|
+
name: config.domain,
|
|
187
|
+
type: "CNAME",
|
|
188
|
+
ttl: 60,
|
|
189
|
+
setIdentifier: `${name}-default`,
|
|
190
|
+
geolocationRoutingPolicies: [{ country: "*" }],
|
|
191
|
+
healthCheckId: fallback.healthCheck.id,
|
|
192
|
+
records: [
|
|
193
|
+
fallback.cluster.endpoint.apply((ep) => {
|
|
194
|
+
try {
|
|
195
|
+
return new URL(ep).hostname;
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
return ep;
|
|
199
|
+
}
|
|
200
|
+
}),
|
|
201
|
+
],
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Health status output
|
|
209
|
+
const healthStatus = pulumi.all(healthChecks.map((entry) => pulumi.all([pulumi.output(entry.cluster.name), entry.healthCheck.id]).apply(([clusterName]) => ({
|
|
210
|
+
cluster: clusterName,
|
|
211
|
+
healthy: true, // Initial state; actual health determined by Route53
|
|
212
|
+
}))));
|
|
213
|
+
return {
|
|
214
|
+
name,
|
|
215
|
+
strategy: config.strategy,
|
|
216
|
+
endpoint: pulumi.output(config.domain),
|
|
217
|
+
healthStatus: healthStatus,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=glb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glb.js","sourceRoot":"","sources":["../../../src/global-lb/glb.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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AAM,CAAC,MAAM,CAAC,MAAM,CAAC;QACtC,YAAY,EAAE,YAAkE;KACjF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global load balancer module — multi-cloud traffic routing.
|
|
3
|
+
*
|
|
4
|
+
* @module global-lb
|
|
5
|
+
*/
|
|
6
|
+
export type { RoutingStrategy, GlbDnsProvider, IHealthCheck, IGlobalLoadBalancerConfig, IClusterHealthStatus, IGlobalLoadBalancer, } from "./interfaces";
|
|
7
|
+
export { createGlobalLoadBalancer } from "./glb";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/global-lb/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global load balancer module — multi-cloud traffic routing.
|
|
4
|
+
*
|
|
5
|
+
* @module global-lb
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createGlobalLoadBalancer = void 0;
|
|
9
|
+
var glb_1 = require("./glb");
|
|
10
|
+
Object.defineProperty(exports, "createGlobalLoadBalancer", { enumerable: true, get: function () { return glb_1.createGlobalLoadBalancer; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/global-lb/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAWH,6BAAiD;AAAxC,+GAAA,wBAAwB,OAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global load balancer interfaces for @reyemtech/nimbus.
|
|
3
|
+
*
|
|
4
|
+
* Multi-cloud traffic routing with health checks, supporting
|
|
5
|
+
* active-active, active-passive, and geo-routing strategies.
|
|
6
|
+
*
|
|
7
|
+
* @module global-lb/interfaces
|
|
8
|
+
*/
|
|
9
|
+
import type * as pulumi from "@pulumi/pulumi";
|
|
10
|
+
import type { ICluster } from "../cluster";
|
|
11
|
+
/** Routing strategy for multi-cluster traffic. */
|
|
12
|
+
export type RoutingStrategy = "active-active" | "active-passive" | "geo";
|
|
13
|
+
/** DNS provider for global load balancing. */
|
|
14
|
+
export type GlbDnsProvider = "route53" | "cloudflare" | "azure-traffic-manager";
|
|
15
|
+
/** Health check configuration. */
|
|
16
|
+
export interface IHealthCheck {
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly port: number;
|
|
19
|
+
readonly protocol: "HTTP" | "HTTPS" | "TCP";
|
|
20
|
+
/** Health check interval in seconds. Default: 30. */
|
|
21
|
+
readonly intervalSeconds?: number;
|
|
22
|
+
/** Timeout in seconds. Default: 10. */
|
|
23
|
+
readonly timeoutSeconds?: number;
|
|
24
|
+
/** Consecutive successes needed to mark healthy. Default: 3. */
|
|
25
|
+
readonly healthyThreshold?: number;
|
|
26
|
+
/** Consecutive failures needed to mark unhealthy. Default: 3. */
|
|
27
|
+
readonly unhealthyThreshold?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Global load balancer configuration input.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const config: IGlobalLoadBalancerConfig = {
|
|
35
|
+
* strategy: "active-active",
|
|
36
|
+
* clusters: [awsCluster, azureCluster],
|
|
37
|
+
* domain: "app.example.com",
|
|
38
|
+
* healthCheck: { path: "/health", port: 443, protocol: "HTTPS" },
|
|
39
|
+
* dnsProvider: "route53",
|
|
40
|
+
* };
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export interface IGlobalLoadBalancerConfig {
|
|
44
|
+
readonly strategy: RoutingStrategy;
|
|
45
|
+
readonly clusters: ReadonlyArray<ICluster>;
|
|
46
|
+
readonly domain: string;
|
|
47
|
+
readonly healthCheck: IHealthCheck;
|
|
48
|
+
readonly dnsProvider: GlbDnsProvider;
|
|
49
|
+
}
|
|
50
|
+
/** Cluster health status entry. */
|
|
51
|
+
export interface IClusterHealthStatus {
|
|
52
|
+
readonly cluster: string;
|
|
53
|
+
readonly healthy: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Global load balancer output. */
|
|
56
|
+
export interface IGlobalLoadBalancer {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly strategy: RoutingStrategy;
|
|
59
|
+
readonly endpoint: pulumi.Output<string>;
|
|
60
|
+
readonly healthStatus: pulumi.Output<ReadonlyArray<IClusterHealthStatus>>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/global-lb/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,kDAAkD;AAClD,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,gBAAgB,GAChB,KAAK,CAAC;AAEV,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,YAAY,GACZ,uBAAuB,CAAC;AAE5B,kCAAkC;AAClC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAC5C,qDAAqD;IACrD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,uCAAuC;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,iEAAiE;IACjE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;CACtC;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,mCAAmC;AACnC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAC3E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global load balancer interfaces for @reyemtech/nimbus.
|
|
4
|
+
*
|
|
5
|
+
* Multi-cloud traffic routing with health checks, supporting
|
|
6
|
+
* active-active, active-passive, and geo-routing strategies.
|
|
7
|
+
*
|
|
8
|
+
* @module global-lb/interfaces
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/global-lb/interfaces.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @reyemtech/nimbus
|
|
3
|
+
*
|
|
4
|
+
* Cloud-agnostic infrastructure abstractions for Pulumi.
|
|
5
|
+
* Enables BCDR: any client environment fully reproducible from code,
|
|
6
|
+
* cloud migration = change one config value.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export { type CloudProvider, type CloudTarget, type CloudArg, type ResolvedCloudTarget, DEFAULT_REGIONS, CLOUD_PROVIDERS, isCloudProvider, isCloudTarget, resolveCloudTarget, } from "./types";
|
|
11
|
+
export { type ErrorCode, ERROR_CODES, AnyCloudError, CloudValidationError, CidrError, UnsupportedFeatureError, ConfigError, assertNever, } from "./types";
|
|
12
|
+
export { type IRequiredTags, normalizeTags, isValidGcpLabel, mergeWithRequiredTags } from "./types";
|
|
13
|
+
export { type IValidationResult, validateFeature, isFeatureSupported, validateMultiCloud, validateResourceName, assertValidMultiCloud, } from "./types";
|
|
14
|
+
export type { INodeTaint, INodePool, IClusterConfig, ICluster, IEksClusterExtensions, IAksClusterExtensions, IGkeClusterExtensions, ProviderClusterExtensions, } from "./cluster";
|
|
15
|
+
export type { NatStrategy, ISubnetConfig, INetworkConfig, INetwork } from "./network";
|
|
16
|
+
export { parseCidr, formatIp, cidrsOverlap, detectOverlaps, validateNoOverlaps, autoOffsetCidrs, buildCidrMap, } from "./network";
|
|
17
|
+
export type { DnsRecordType, IDnsRecord, IDnsConfig, IDns } from "./dns";
|
|
18
|
+
export type { SecretBackend, ISecretRef, ISecretsConfig, ISecrets } from "./secrets";
|
|
19
|
+
export type { DatabaseEngine, DatabaseMode, DatabaseOperator, IDatabaseBackupConfig, IDatabaseConfig, IDatabase, } from "./database";
|
|
20
|
+
export type { CacheEngine, CacheMode, CacheArchitecture, ICacheConfig, ICache } from "./cache";
|
|
21
|
+
export type { ILifecycleRule, ICorsRule, IObjectStorageConfig, IObjectStorage } from "./storage";
|
|
22
|
+
export type { QueueEngine, QueueMode, QueueType, IQueueConfig, IQueue } from "./queue";
|
|
23
|
+
export { type DnsProvider, type IPlatformComponentConfig, type IExternalDnsConfig, type IVaultConfig, type IPlatformStackConfig, type IPlatformStack, createPlatformStack, } from "./platform";
|
|
24
|
+
export { type RoutingStrategy, type GlbDnsProvider, type IHealthCheck, type IGlobalLoadBalancerConfig, type IClusterHealthStatus, type IGlobalLoadBalancer, createGlobalLoadBalancer, } from "./global-lb";
|
|
25
|
+
export { createNetwork, createCluster, createDns, createSecrets, type ICreateNetworkConfig, type ICreateClusterConfig, type ICreateDnsConfig, type ICreateSecretsConfig, type IProviderOptions, type IAwsProviderOptions, type IAzureProviderOptions, extractProvider, isMultiCloud, } from "./factories";
|
|
26
|
+
export { createAwsNetwork, type IAwsNetworkOptions, createEksCluster, type IEksOptions, createRoute53Dns, createAwsSecrets, } from "./aws";
|
|
27
|
+
export { createAzureNetwork, type IAzureNetworkOptions, createAksCluster, type IAksOptions, createAzureDns, type IAzureDnsOptions, createAzureSecrets, type IAzureSecretsOptions, } from "./azure";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAC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,MAAM,SAAS,CAAC;AAGvF,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,eAAe,EACf,YAAY,GACb,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,KAAK,WAAW,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,WAAW,EAChB,cAAc,EACd,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,oBAAoB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @reyemtech/nimbus
|
|
4
|
+
*
|
|
5
|
+
* Cloud-agnostic infrastructure abstractions for Pulumi.
|
|
6
|
+
* Enables BCDR: any client environment fully reproducible from code,
|
|
7
|
+
* cloud migration = change one config value.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createAzureSecrets = exports.createAzureDns = exports.createAksCluster = exports.createAzureNetwork = exports.createAwsSecrets = exports.createRoute53Dns = exports.createEksCluster = exports.createAwsNetwork = exports.isMultiCloud = exports.extractProvider = exports.createSecrets = exports.createDns = exports.createCluster = exports.createNetwork = exports.createGlobalLoadBalancer = exports.createPlatformStack = exports.buildCidrMap = exports.autoOffsetCidrs = exports.validateNoOverlaps = exports.detectOverlaps = exports.cidrsOverlap = exports.formatIp = exports.parseCidr = exports.assertValidMultiCloud = exports.validateResourceName = exports.validateMultiCloud = exports.isFeatureSupported = exports.validateFeature = exports.mergeWithRequiredTags = exports.isValidGcpLabel = exports.normalizeTags = exports.assertNever = exports.ConfigError = exports.UnsupportedFeatureError = exports.CidrError = exports.CloudValidationError = exports.AnyCloudError = exports.ERROR_CODES = exports.resolveCloudTarget = exports.isCloudTarget = exports.isCloudProvider = exports.CLOUD_PROVIDERS = exports.DEFAULT_REGIONS = void 0;
|
|
13
|
+
// Core types
|
|
14
|
+
var types_1 = require("./types");
|
|
15
|
+
Object.defineProperty(exports, "DEFAULT_REGIONS", { enumerable: true, get: function () { return types_1.DEFAULT_REGIONS; } });
|
|
16
|
+
Object.defineProperty(exports, "CLOUD_PROVIDERS", { enumerable: true, get: function () { return types_1.CLOUD_PROVIDERS; } });
|
|
17
|
+
Object.defineProperty(exports, "isCloudProvider", { enumerable: true, get: function () { return types_1.isCloudProvider; } });
|
|
18
|
+
Object.defineProperty(exports, "isCloudTarget", { enumerable: true, get: function () { return types_1.isCloudTarget; } });
|
|
19
|
+
Object.defineProperty(exports, "resolveCloudTarget", { enumerable: true, get: function () { return types_1.resolveCloudTarget; } });
|
|
20
|
+
var types_2 = require("./types");
|
|
21
|
+
Object.defineProperty(exports, "ERROR_CODES", { enumerable: true, get: function () { return types_2.ERROR_CODES; } });
|
|
22
|
+
Object.defineProperty(exports, "AnyCloudError", { enumerable: true, get: function () { return types_2.AnyCloudError; } });
|
|
23
|
+
Object.defineProperty(exports, "CloudValidationError", { enumerable: true, get: function () { return types_2.CloudValidationError; } });
|
|
24
|
+
Object.defineProperty(exports, "CidrError", { enumerable: true, get: function () { return types_2.CidrError; } });
|
|
25
|
+
Object.defineProperty(exports, "UnsupportedFeatureError", { enumerable: true, get: function () { return types_2.UnsupportedFeatureError; } });
|
|
26
|
+
Object.defineProperty(exports, "ConfigError", { enumerable: true, get: function () { return types_2.ConfigError; } });
|
|
27
|
+
Object.defineProperty(exports, "assertNever", { enumerable: true, get: function () { return types_2.assertNever; } });
|
|
28
|
+
var types_3 = require("./types");
|
|
29
|
+
Object.defineProperty(exports, "normalizeTags", { enumerable: true, get: function () { return types_3.normalizeTags; } });
|
|
30
|
+
Object.defineProperty(exports, "isValidGcpLabel", { enumerable: true, get: function () { return types_3.isValidGcpLabel; } });
|
|
31
|
+
Object.defineProperty(exports, "mergeWithRequiredTags", { enumerable: true, get: function () { return types_3.mergeWithRequiredTags; } });
|
|
32
|
+
var types_4 = require("./types");
|
|
33
|
+
Object.defineProperty(exports, "validateFeature", { enumerable: true, get: function () { return types_4.validateFeature; } });
|
|
34
|
+
Object.defineProperty(exports, "isFeatureSupported", { enumerable: true, get: function () { return types_4.isFeatureSupported; } });
|
|
35
|
+
Object.defineProperty(exports, "validateMultiCloud", { enumerable: true, get: function () { return types_4.validateMultiCloud; } });
|
|
36
|
+
Object.defineProperty(exports, "validateResourceName", { enumerable: true, get: function () { return types_4.validateResourceName; } });
|
|
37
|
+
Object.defineProperty(exports, "assertValidMultiCloud", { enumerable: true, get: function () { return types_4.assertValidMultiCloud; } });
|
|
38
|
+
var network_1 = require("./network");
|
|
39
|
+
Object.defineProperty(exports, "parseCidr", { enumerable: true, get: function () { return network_1.parseCidr; } });
|
|
40
|
+
Object.defineProperty(exports, "formatIp", { enumerable: true, get: function () { return network_1.formatIp; } });
|
|
41
|
+
Object.defineProperty(exports, "cidrsOverlap", { enumerable: true, get: function () { return network_1.cidrsOverlap; } });
|
|
42
|
+
Object.defineProperty(exports, "detectOverlaps", { enumerable: true, get: function () { return network_1.detectOverlaps; } });
|
|
43
|
+
Object.defineProperty(exports, "validateNoOverlaps", { enumerable: true, get: function () { return network_1.validateNoOverlaps; } });
|
|
44
|
+
Object.defineProperty(exports, "autoOffsetCidrs", { enumerable: true, get: function () { return network_1.autoOffsetCidrs; } });
|
|
45
|
+
Object.defineProperty(exports, "buildCidrMap", { enumerable: true, get: function () { return network_1.buildCidrMap; } });
|
|
46
|
+
// Platform
|
|
47
|
+
var platform_1 = require("./platform");
|
|
48
|
+
Object.defineProperty(exports, "createPlatformStack", { enumerable: true, get: function () { return platform_1.createPlatformStack; } });
|
|
49
|
+
// Global Load Balancer
|
|
50
|
+
var global_lb_1 = require("./global-lb");
|
|
51
|
+
Object.defineProperty(exports, "createGlobalLoadBalancer", { enumerable: true, get: function () { return global_lb_1.createGlobalLoadBalancer; } });
|
|
52
|
+
// Factory functions (primary API)
|
|
53
|
+
var factories_1 = require("./factories");
|
|
54
|
+
Object.defineProperty(exports, "createNetwork", { enumerable: true, get: function () { return factories_1.createNetwork; } });
|
|
55
|
+
Object.defineProperty(exports, "createCluster", { enumerable: true, get: function () { return factories_1.createCluster; } });
|
|
56
|
+
Object.defineProperty(exports, "createDns", { enumerable: true, get: function () { return factories_1.createDns; } });
|
|
57
|
+
Object.defineProperty(exports, "createSecrets", { enumerable: true, get: function () { return factories_1.createSecrets; } });
|
|
58
|
+
Object.defineProperty(exports, "extractProvider", { enumerable: true, get: function () { return factories_1.extractProvider; } });
|
|
59
|
+
Object.defineProperty(exports, "isMultiCloud", { enumerable: true, get: function () { return factories_1.isMultiCloud; } });
|
|
60
|
+
// AWS Provider (direct access)
|
|
61
|
+
var aws_1 = require("./aws");
|
|
62
|
+
Object.defineProperty(exports, "createAwsNetwork", { enumerable: true, get: function () { return aws_1.createAwsNetwork; } });
|
|
63
|
+
Object.defineProperty(exports, "createEksCluster", { enumerable: true, get: function () { return aws_1.createEksCluster; } });
|
|
64
|
+
Object.defineProperty(exports, "createRoute53Dns", { enumerable: true, get: function () { return aws_1.createRoute53Dns; } });
|
|
65
|
+
Object.defineProperty(exports, "createAwsSecrets", { enumerable: true, get: function () { return aws_1.createAwsSecrets; } });
|
|
66
|
+
// Azure Provider (direct access)
|
|
67
|
+
var azure_1 = require("./azure");
|
|
68
|
+
Object.defineProperty(exports, "createAzureNetwork", { enumerable: true, get: function () { return azure_1.createAzureNetwork; } });
|
|
69
|
+
Object.defineProperty(exports, "createAksCluster", { enumerable: true, get: function () { return azure_1.createAksCluster; } });
|
|
70
|
+
Object.defineProperty(exports, "createAzureDns", { enumerable: true, get: function () { return azure_1.createAzureDns; } });
|
|
71
|
+
Object.defineProperty(exports, "createAzureSecrets", { enumerable: true, get: function () { return azure_1.createAzureSecrets; } });
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,aAAa;AACb,iCAUiB;AALf,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,sGAAA,aAAa,OAAA;AACb,2GAAA,kBAAkB,OAAA;AAGpB,iCASiB;AAPf,oGAAA,WAAW,OAAA;AACX,sGAAA,aAAa,OAAA;AACb,6GAAA,oBAAoB,OAAA;AACpB,kGAAA,SAAS,OAAA;AACT,gHAAA,uBAAuB,OAAA;AACvB,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AAGb,iCAAoG;AAAvE,sGAAA,aAAa,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,8GAAA,qBAAqB,OAAA;AAElF,iCAOiB;AALf,wGAAA,eAAe,OAAA;AACf,2GAAA,kBAAkB,OAAA;AAClB,2GAAA,kBAAkB,OAAA;AAClB,6GAAA,oBAAoB,OAAA;AACpB,8GAAA,qBAAqB,OAAA;AAkBvB,qCAQmB;AAPjB,oGAAA,SAAS,OAAA;AACT,mGAAA,QAAQ,OAAA;AACR,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,6GAAA,kBAAkB,OAAA;AAClB,0GAAA,eAAe,OAAA;AACf,uGAAA,YAAY,OAAA;AA4Bd,WAAW;AACX,uCAQoB;AADlB,+GAAA,mBAAmB,OAAA;AAGrB,uBAAuB;AACvB,yCAQqB;AADnB,qHAAA,wBAAwB,OAAA;AAG1B,kCAAkC;AAClC,yCAcqB;AAbnB,0GAAA,aAAa,OAAA;AACb,0GAAA,aAAa,OAAA;AACb,sGAAA,SAAS,OAAA;AACT,0GAAA,aAAa,OAAA;AAQb,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AAGd,+BAA+B;AAC/B,6BAOe;AANb,uGAAA,gBAAgB,OAAA;AAEhB,uGAAA,gBAAgB,OAAA;AAEhB,uGAAA,gBAAgB,OAAA;AAChB,uGAAA,gBAAgB,OAAA;AAGlB,iCAAiC;AACjC,iCASiB;AARf,2GAAA,kBAAkB,OAAA;AAElB,yGAAA,gBAAgB,OAAA;AAEhB,uGAAA,cAAc,OAAA;AAEd,2GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CIDR utilities for multi-cloud network planning.
|
|
3
|
+
*
|
|
4
|
+
* Provides overlap detection, auto-offset for non-conflicting CIDRs,
|
|
5
|
+
* and validation for multi-cloud VPC peering/mesh scenarios.
|
|
6
|
+
*
|
|
7
|
+
* @module network/cidr
|
|
8
|
+
*/
|
|
9
|
+
/** Parsed CIDR representation. */
|
|
10
|
+
interface ParsedCidr {
|
|
11
|
+
readonly network: number;
|
|
12
|
+
readonly prefix: number;
|
|
13
|
+
readonly size: number;
|
|
14
|
+
readonly start: number;
|
|
15
|
+
readonly end: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse a CIDR string into its numeric components.
|
|
19
|
+
*
|
|
20
|
+
* @param cidr - CIDR notation string (e.g., "10.0.0.0/16")
|
|
21
|
+
* @returns Parsed CIDR with start/end addresses
|
|
22
|
+
* @throws {CidrError} If the CIDR string is malformed
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseCidr(cidr: string): ParsedCidr;
|
|
25
|
+
/**
|
|
26
|
+
* Format a numeric IP address back to dotted notation.
|
|
27
|
+
*
|
|
28
|
+
* @param ip - 32-bit unsigned integer IP address
|
|
29
|
+
* @returns Dotted decimal string
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatIp(ip: number): string;
|
|
32
|
+
/**
|
|
33
|
+
* Check if two CIDR ranges overlap.
|
|
34
|
+
*
|
|
35
|
+
* @param a - First CIDR string
|
|
36
|
+
* @param b - Second CIDR string
|
|
37
|
+
* @returns True if ranges overlap
|
|
38
|
+
*/
|
|
39
|
+
export declare function cidrsOverlap(a: string, b: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Detect overlaps in a set of CIDRs.
|
|
42
|
+
*
|
|
43
|
+
* @param cidrs - Array of CIDR strings to check
|
|
44
|
+
* @returns Array of overlapping pairs, empty if no conflicts
|
|
45
|
+
*/
|
|
46
|
+
export declare function detectOverlaps(cidrs: ReadonlyArray<string>): ReadonlyArray<[string, string]>;
|
|
47
|
+
/**
|
|
48
|
+
* Validate that a set of CIDRs do not overlap.
|
|
49
|
+
*
|
|
50
|
+
* @param cidrs - Array of CIDR strings
|
|
51
|
+
* @throws {CidrError} If any CIDRs overlap
|
|
52
|
+
*/
|
|
53
|
+
export declare function validateNoOverlaps(cidrs: ReadonlyArray<string>): void;
|
|
54
|
+
/**
|
|
55
|
+
* Auto-generate non-overlapping CIDRs for multiple clouds.
|
|
56
|
+
*
|
|
57
|
+
* Uses 10.{offset}.0.0/16 pattern with configurable base and step.
|
|
58
|
+
*
|
|
59
|
+
* @param count - Number of CIDRs to generate
|
|
60
|
+
* @param options - Base octet and step between CIDRs
|
|
61
|
+
* @returns Array of non-overlapping CIDR strings
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* autoOffsetCidrs(3); // ["10.0.0.0/16", "10.1.0.0/16", "10.2.0.0/16"]
|
|
66
|
+
* autoOffsetCidrs(2, { base: 10, step: 10 }); // ["10.10.0.0/16", "10.20.0.0/16"]
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function autoOffsetCidrs(count: number, options?: {
|
|
70
|
+
base?: number;
|
|
71
|
+
step?: number;
|
|
72
|
+
prefix?: number;
|
|
73
|
+
}): ReadonlyArray<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Build a CIDR map for named clouds from explicit values or auto-offset.
|
|
76
|
+
*
|
|
77
|
+
* If explicit CIDRs are provided for all clouds, validates no overlaps.
|
|
78
|
+
* For missing clouds, auto-generates non-overlapping CIDRs.
|
|
79
|
+
*
|
|
80
|
+
* @param clouds - Array of cloud names
|
|
81
|
+
* @param explicit - Explicit CIDR assignments (partial or full)
|
|
82
|
+
* @returns Complete CIDR map keyed by cloud name
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* buildCidrMap(["aws", "azure"], { aws: "10.0.0.0/16" });
|
|
87
|
+
* // { aws: "10.0.0.0/16", azure: "10.1.0.0/16" }
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function buildCidrMap(clouds: ReadonlyArray<string>, explicit?: Readonly<Record<string, string>>): Readonly<Record<string, string>>;
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=cidr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cidr.d.ts","sourceRoot":"","sources":["../../../src/network/cidr.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,kCAAkC;AAClC,UAAU,UAAU;IAClB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,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