actor-ts 0.9.0 → 0.10.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/CHANGELOG.md +408 -0
- package/README.md +285 -269
- package/dist/ActorSystem.d.ts +3 -38
- package/dist/ActorSystem.d.ts.map +1 -1
- package/dist/ActorSystem.js +2 -2
- package/dist/ActorSystem.js.map +1 -1
- package/dist/ActorSystemOptions.d.ts +91 -0
- package/dist/ActorSystemOptions.d.ts.map +1 -0
- package/dist/ActorSystemOptions.js +45 -0
- package/dist/ActorSystemOptions.js.map +1 -0
- package/dist/Logger.d.ts +63 -0
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +146 -0
- package/dist/Logger.js.map +1 -1
- package/dist/cache/MemcachedCache.d.ts +2 -12
- package/dist/cache/MemcachedCache.d.ts.map +1 -1
- package/dist/cache/MemcachedCache.js +2 -1
- package/dist/cache/MemcachedCache.js.map +1 -1
- package/dist/cache/MemcachedCacheOptions.d.ts +40 -0
- package/dist/cache/MemcachedCacheOptions.d.ts.map +1 -0
- package/dist/cache/MemcachedCacheOptions.js +32 -0
- package/dist/cache/MemcachedCacheOptions.js.map +1 -0
- package/dist/cache/RedisCache.d.ts +2 -22
- package/dist/cache/RedisCache.d.ts.map +1 -1
- package/dist/cache/RedisCache.js +2 -1
- package/dist/cache/RedisCache.js.map +1 -1
- package/dist/cache/RedisCacheOptions.d.ts +56 -0
- package/dist/cache/RedisCacheOptions.d.ts.map +1 -0
- package/dist/cache/RedisCacheOptions.js +43 -0
- package/dist/cache/RedisCacheOptions.js.map +1 -0
- package/dist/cache/index.d.ts +6 -2
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +2 -0
- package/dist/cache/index.js.map +1 -1
- package/dist/cluster/Cluster.d.ts +4 -63
- package/dist/cluster/Cluster.d.ts.map +1 -1
- package/dist/cluster/Cluster.js +10 -5
- package/dist/cluster/Cluster.js.map +1 -1
- package/dist/cluster/ClusterBootstrap.d.ts +6 -84
- package/dist/cluster/ClusterBootstrap.d.ts.map +1 -1
- package/dist/cluster/ClusterBootstrap.js +33 -21
- package/dist/cluster/ClusterBootstrap.js.map +1 -1
- package/dist/cluster/ClusterBootstrapOptions.d.ts +152 -0
- package/dist/cluster/ClusterBootstrapOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterBootstrapOptions.js +103 -0
- package/dist/cluster/ClusterBootstrapOptions.js.map +1 -0
- package/dist/cluster/ClusterClient.d.ts +21 -31
- package/dist/cluster/ClusterClient.d.ts.map +1 -1
- package/dist/cluster/ClusterClient.js +21 -6
- package/dist/cluster/ClusterClient.js.map +1 -1
- package/dist/cluster/ClusterClientOptions.d.ts +65 -0
- package/dist/cluster/ClusterClientOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientOptions.js +43 -0
- package/dist/cluster/ClusterClientOptions.js.map +1 -0
- package/dist/cluster/ClusterClientReceptionist.d.ts +2 -8
- package/dist/cluster/ClusterClientReceptionist.d.ts.map +1 -1
- package/dist/cluster/ClusterClientReceptionist.js +3 -1
- package/dist/cluster/ClusterClientReceptionist.js.map +1 -1
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts +32 -0
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js +22 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js.map +1 -0
- package/dist/cluster/ClusterOptions.d.ts +116 -0
- package/dist/cluster/ClusterOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterOptions.js +77 -0
- package/dist/cluster/ClusterOptions.js.map +1 -0
- package/dist/cluster/FailureDetector.d.ts +4 -11
- package/dist/cluster/FailureDetector.d.ts.map +1 -1
- package/dist/cluster/FailureDetector.js +4 -3
- package/dist/cluster/FailureDetector.js.map +1 -1
- package/dist/cluster/FailureDetectorOptions.d.ts +38 -0
- package/dist/cluster/FailureDetectorOptions.d.ts.map +1 -0
- package/dist/cluster/FailureDetectorOptions.js +31 -0
- package/dist/cluster/FailureDetectorOptions.js.map +1 -0
- package/dist/cluster/PhiAccrualFailureDetector.d.ts +3 -19
- package/dist/cluster/PhiAccrualFailureDetector.d.ts.map +1 -1
- package/dist/cluster/PhiAccrualFailureDetector.js +2 -2
- package/dist/cluster/PhiAccrualFailureDetector.js.map +1 -1
- package/dist/cluster/PhiAccrualOptions.d.ts +53 -0
- package/dist/cluster/PhiAccrualOptions.d.ts.map +1 -0
- package/dist/cluster/PhiAccrualOptions.js +43 -0
- package/dist/cluster/PhiAccrualOptions.js.map +1 -0
- package/dist/cluster/downing/KeepOldest.d.ts +2 -11
- package/dist/cluster/downing/KeepOldest.d.ts.map +1 -1
- package/dist/cluster/downing/KeepOldest.js +2 -2
- package/dist/cluster/downing/KeepOldest.js.map +1 -1
- package/dist/cluster/downing/KeepOldestOptions.d.ts +34 -0
- package/dist/cluster/downing/KeepOldestOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepOldestOptions.js +23 -0
- package/dist/cluster/downing/KeepOldestOptions.js.map +1 -0
- package/dist/cluster/downing/KeepReferee.d.ts +2 -10
- package/dist/cluster/downing/KeepReferee.d.ts.map +1 -1
- package/dist/cluster/downing/KeepReferee.js +3 -3
- package/dist/cluster/downing/KeepReferee.js.map +1 -1
- package/dist/cluster/downing/KeepRefereeOptions.d.ts +35 -0
- package/dist/cluster/downing/KeepRefereeOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepRefereeOptions.js +25 -0
- package/dist/cluster/downing/KeepRefereeOptions.js.map +1 -0
- package/dist/cluster/downing/LeaseMajority.d.ts +63 -21
- package/dist/cluster/downing/LeaseMajority.d.ts.map +1 -1
- package/dist/cluster/downing/LeaseMajority.js +132 -9
- package/dist/cluster/downing/LeaseMajority.js.map +1 -1
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts +49 -0
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts.map +1 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js +31 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js.map +1 -0
- package/dist/cluster/downing/StaticQuorum.d.ts +2 -7
- package/dist/cluster/downing/StaticQuorum.d.ts.map +1 -1
- package/dist/cluster/downing/StaticQuorum.js +3 -3
- package/dist/cluster/downing/StaticQuorum.js.map +1 -1
- package/dist/cluster/downing/StaticQuorumOptions.d.ts +30 -0
- package/dist/cluster/downing/StaticQuorumOptions.d.ts.map +1 -0
- package/dist/cluster/downing/StaticQuorumOptions.js +23 -0
- package/dist/cluster/downing/StaticQuorumOptions.js.map +1 -0
- package/dist/cluster/downing/index.d.ts +8 -4
- package/dist/cluster/downing/index.d.ts.map +1 -1
- package/dist/cluster/downing/index.js +4 -0
- package/dist/cluster/downing/index.js.map +1 -1
- package/dist/cluster/index.d.ts +34 -19
- package/dist/cluster/index.d.ts.map +1 -1
- package/dist/cluster/index.js +15 -4
- package/dist/cluster/index.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts +2 -2
- package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubExtension.js +5 -2
- package/dist/cluster/pubsub/DistributedPubSubExtension.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts +3 -7
- package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubMediator.js +3 -3
- package/dist/cluster/pubsub/DistributedPubSubMediator.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts +29 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts.map +1 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js +23 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js.map +1 -0
- package/dist/cluster/pubsub/index.d.ts +2 -1
- package/dist/cluster/pubsub/index.d.ts.map +1 -1
- package/dist/cluster/pubsub/index.js +1 -0
- package/dist/cluster/pubsub/index.js.map +1 -1
- package/dist/cluster/router/ClusterRouter.d.ts +12 -32
- package/dist/cluster/router/ClusterRouter.d.ts.map +1 -1
- package/dist/cluster/router/ClusterRouter.js +4 -2
- package/dist/cluster/router/ClusterRouter.js.map +1 -1
- package/dist/cluster/router/ClusterRouterOptions.d.ts +60 -0
- package/dist/cluster/router/ClusterRouterOptions.d.ts.map +1 -0
- package/dist/cluster/router/ClusterRouterOptions.js +41 -0
- package/dist/cluster/router/ClusterRouterOptions.js.map +1 -0
- package/dist/cluster/router/index.d.ts +3 -1
- package/dist/cluster/router/index.d.ts.map +1 -1
- package/dist/cluster/router/index.js +1 -0
- package/dist/cluster/router/index.js.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts +1 -15
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.js +35 -2
- package/dist/cluster/sharding/CassandraRememberEntitiesStore.js.map +1 -1
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts +63 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js +63 -0
- package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js.map +1 -0
- package/dist/cluster/sharding/ClusterSharding.d.ts +18 -64
- package/dist/cluster/sharding/ClusterSharding.d.ts.map +1 -1
- package/dist/cluster/sharding/ClusterSharding.js +44 -20
- package/dist/cluster/sharding/ClusterSharding.js.map +1 -1
- package/dist/cluster/sharding/CoordinatorState.d.ts +1 -1
- package/dist/cluster/sharding/CoordinatorState.js +1 -1
- package/dist/cluster/sharding/ShardCoordinator.d.ts +3 -63
- package/dist/cluster/sharding/ShardCoordinator.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardCoordinator.js +3 -3
- package/dist/cluster/sharding/ShardCoordinator.js.map +1 -1
- package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts +111 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.js +69 -0
- package/dist/cluster/sharding/ShardCoordinatorOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardRegion.d.ts +2 -33
- package/dist/cluster/sharding/ShardRegion.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardRegion.js.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcess.d.ts +2 -22
- package/dist/cluster/sharding/ShardedDaemonProcess.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcess.js +14 -11
- package/dist/cluster/sharding/ShardedDaemonProcess.js.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts +51 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js +35 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts +84 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.js +62 -0
- package/dist/cluster/sharding/ShardingOptions.js.map +1 -0
- package/dist/cluster/sharding/StartShardingOptions.d.ts +98 -0
- package/dist/cluster/sharding/StartShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/StartShardingOptions.js +52 -0
- package/dist/cluster/sharding/StartShardingOptions.js.map +1 -0
- package/dist/cluster/singleton/ClusterSingleton.d.ts +2 -30
- package/dist/cluster/singleton/ClusterSingleton.d.ts.map +1 -1
- package/dist/cluster/singleton/ClusterSingleton.js +15 -9
- package/dist/cluster/singleton/ClusterSingleton.js.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts +3 -18
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.js +3 -3
- package/dist/cluster/singleton/ClusterSingletonManager.js.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts +49 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts.map +1 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.js +40 -0
- package/dist/cluster/singleton/ClusterSingletonManagerOptions.js.map +1 -0
- package/dist/cluster/singleton/StartSingletonOptions.d.ts +64 -0
- package/dist/cluster/singleton/StartSingletonOptions.d.ts.map +1 -0
- package/dist/cluster/singleton/StartSingletonOptions.js +40 -0
- package/dist/cluster/singleton/StartSingletonOptions.js.map +1 -0
- package/dist/cluster/singleton/index.d.ts +6 -2
- package/dist/cluster/singleton/index.d.ts.map +1 -1
- package/dist/cluster/singleton/index.js +2 -0
- package/dist/cluster/singleton/index.js.map +1 -1
- package/dist/config/ConfigKeys.d.ts +5 -0
- package/dist/config/ConfigKeys.d.ts.map +1 -1
- package/dist/config/ConfigKeys.js +5 -0
- package/dist/config/ConfigKeys.js.map +1 -1
- package/dist/coordination/Lease.d.ts +32 -14
- package/dist/coordination/Lease.d.ts.map +1 -1
- package/dist/coordination/LeaseOptions.d.ts +61 -0
- package/dist/coordination/LeaseOptions.d.ts.map +1 -0
- package/dist/coordination/LeaseOptions.js +50 -0
- package/dist/coordination/LeaseOptions.js.map +1 -0
- package/dist/coordination/index.d.ts +5 -2
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +2 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/leases/InMemoryLease.d.ts +18 -5
- package/dist/coordination/leases/InMemoryLease.d.ts.map +1 -1
- package/dist/coordination/leases/InMemoryLease.js +23 -11
- package/dist/coordination/leases/InMemoryLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLease.d.ts +19 -24
- package/dist/coordination/leases/KubernetesLease.d.ts.map +1 -1
- package/dist/coordination/leases/KubernetesLease.js +28 -9
- package/dist/coordination/leases/KubernetesLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts +58 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts.map +1 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js +42 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js.map +1 -0
- package/dist/crdt/DistributedData.d.ts +2 -22
- package/dist/crdt/DistributedData.d.ts.map +1 -1
- package/dist/crdt/DistributedData.js +3 -2
- package/dist/crdt/DistributedData.js.map +1 -1
- package/dist/crdt/DistributedDataOptions.d.ts +50 -0
- package/dist/crdt/DistributedDataOptions.d.ts.map +1 -0
- package/dist/crdt/DistributedDataOptions.js +28 -0
- package/dist/crdt/DistributedDataOptions.js.map +1 -0
- package/dist/crdt/index.d.ts +3 -1
- package/dist/crdt/index.d.ts.map +1 -1
- package/dist/crdt/index.js +1 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/delivery/ProducerController.d.ts +4 -19
- package/dist/delivery/ProducerController.d.ts.map +1 -1
- package/dist/delivery/ProducerController.js +4 -3
- package/dist/delivery/ProducerController.js.map +1 -1
- package/dist/delivery/ProducerControllerOptions.d.ts +50 -0
- package/dist/delivery/ProducerControllerOptions.d.ts.map +1 -0
- package/dist/delivery/ProducerControllerOptions.js +36 -0
- package/dist/delivery/ProducerControllerOptions.js.map +1 -0
- package/dist/delivery/ReliableDelivery.d.ts +3 -2
- package/dist/delivery/ReliableDelivery.d.ts.map +1 -1
- package/dist/delivery/ReliableDelivery.js +2 -2
- package/dist/delivery/ReliableDelivery.js.map +1 -1
- package/dist/delivery/index.d.ts +3 -1
- package/dist/delivery/index.d.ts.map +1 -1
- package/dist/delivery/index.js +1 -0
- package/dist/delivery/index.js.map +1 -1
- package/dist/discovery/AutoDiscoveryOptions.d.ts +72 -0
- package/dist/discovery/AutoDiscoveryOptions.d.ts.map +1 -0
- package/dist/discovery/AutoDiscoveryOptions.js +34 -0
- package/dist/discovery/AutoDiscoveryOptions.js.map +1 -0
- package/dist/discovery/ConfigSeedProvider.d.ts +2 -7
- package/dist/discovery/ConfigSeedProvider.d.ts.map +1 -1
- package/dist/discovery/ConfigSeedProvider.js +4 -3
- package/dist/discovery/ConfigSeedProvider.js.map +1 -1
- package/dist/discovery/ConfigSeedProviderOptions.d.ts +34 -0
- package/dist/discovery/ConfigSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/ConfigSeedProviderOptions.js +27 -0
- package/dist/discovery/ConfigSeedProviderOptions.js.map +1 -0
- package/dist/discovery/DnsSeedProvider.d.ts +3 -27
- package/dist/discovery/DnsSeedProvider.d.ts.map +1 -1
- package/dist/discovery/DnsSeedProvider.js +4 -4
- package/dist/discovery/DnsSeedProvider.js.map +1 -1
- package/dist/discovery/DnsSeedProviderOptions.d.ts +67 -0
- package/dist/discovery/DnsSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/DnsSeedProviderOptions.js +48 -0
- package/dist/discovery/DnsSeedProviderOptions.js.map +1 -0
- package/dist/discovery/KubernetesApiSeedProvider.d.ts +2 -13
- package/dist/discovery/KubernetesApiSeedProvider.d.ts.map +1 -1
- package/dist/discovery/KubernetesApiSeedProvider.js +2 -2
- package/dist/discovery/KubernetesApiSeedProvider.js.map +1 -1
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts +46 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.js +39 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.js.map +1 -0
- package/dist/discovery/Receptionist.d.ts +3 -6
- package/dist/discovery/Receptionist.d.ts.map +1 -1
- package/dist/discovery/Receptionist.js +10 -3
- package/dist/discovery/Receptionist.js.map +1 -1
- package/dist/discovery/ReceptionistOptions.d.ts +30 -0
- package/dist/discovery/ReceptionistOptions.d.ts.map +1 -0
- package/dist/discovery/ReceptionistOptions.js +24 -0
- package/dist/discovery/ReceptionistOptions.js.map +1 -0
- package/dist/discovery/autoDiscovery.d.ts +3 -44
- package/dist/discovery/autoDiscovery.d.ts.map +1 -1
- package/dist/discovery/autoDiscovery.js +31 -32
- package/dist/discovery/autoDiscovery.js.map +1 -1
- package/dist/discovery/index.d.ts +10 -5
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +5 -0
- package/dist/discovery/index.js.map +1 -1
- package/dist/http/HttpExtension.d.ts.map +1 -1
- package/dist/http/HttpExtension.js +69 -8
- package/dist/http/HttpExtension.js.map +1 -1
- package/dist/http/Route.d.ts +76 -4
- package/dist/http/Route.d.ts.map +1 -1
- package/dist/http/Route.js +74 -1
- package/dist/http/Route.js.map +1 -1
- package/dist/http/backend/ExpressBackend.d.ts +18 -12
- package/dist/http/backend/ExpressBackend.d.ts.map +1 -1
- package/dist/http/backend/ExpressBackend.js +134 -8
- package/dist/http/backend/ExpressBackend.js.map +1 -1
- package/dist/http/backend/ExpressBackendOptions.d.ts +47 -0
- package/dist/http/backend/ExpressBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/ExpressBackendOptions.js +35 -0
- package/dist/http/backend/ExpressBackendOptions.js.map +1 -0
- package/dist/http/backend/FastifyBackend.d.ts +4 -1
- package/dist/http/backend/FastifyBackend.d.ts.map +1 -1
- package/dist/http/backend/FastifyBackend.js +71 -1
- package/dist/http/backend/FastifyBackend.js.map +1 -1
- package/dist/http/backend/HonoBackend.d.ts +19 -13
- package/dist/http/backend/HonoBackend.d.ts.map +1 -1
- package/dist/http/backend/HonoBackend.js +152 -5
- package/dist/http/backend/HonoBackend.js.map +1 -1
- package/dist/http/backend/HonoBackendOptions.d.ts +47 -0
- package/dist/http/backend/HonoBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/HonoBackendOptions.js +35 -0
- package/dist/http/backend/HonoBackendOptions.js.map +1 -0
- package/dist/http/backend/HttpServerBackend.d.ts +24 -0
- package/dist/http/backend/HttpServerBackend.d.ts.map +1 -1
- package/dist/http/index.d.ts +11 -5
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +8 -1
- package/dist/http/index.js.map +1 -1
- package/dist/http/middleware/BearerToken.d.ts +44 -0
- package/dist/http/middleware/BearerToken.d.ts.map +1 -0
- package/dist/http/middleware/BearerToken.js +72 -0
- package/dist/http/middleware/BearerToken.js.map +1 -0
- package/dist/http/middleware/IpAllowlist.d.ts +45 -0
- package/dist/http/middleware/IpAllowlist.d.ts.map +1 -0
- package/dist/http/middleware/IpAllowlist.js +148 -0
- package/dist/http/middleware/IpAllowlist.js.map +1 -0
- package/dist/http/middleware/index.d.ts +5 -0
- package/dist/http/middleware/index.d.ts.map +1 -0
- package/dist/http/middleware/index.js +3 -0
- package/dist/http/middleware/index.js.map +1 -0
- package/dist/http/types.d.ts +9 -0
- package/dist/http/types.d.ts.map +1 -1
- package/dist/http/types.js.map +1 -1
- package/dist/http/ws/ConnectionWiring.d.ts +59 -0
- package/dist/http/ws/ConnectionWiring.d.ts.map +1 -0
- package/dist/http/ws/ConnectionWiring.js +112 -0
- package/dist/http/ws/ConnectionWiring.js.map +1 -0
- package/dist/http/ws/SocketAdapter.d.ts +72 -0
- package/dist/http/ws/SocketAdapter.d.ts.map +1 -0
- package/dist/http/ws/SocketAdapter.js +97 -0
- package/dist/http/ws/SocketAdapter.js.map +1 -0
- package/dist/http/ws/WebSocketClientActor.d.ts +66 -0
- package/dist/http/ws/WebSocketClientActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketClientActor.js +194 -0
- package/dist/http/ws/WebSocketClientActor.js.map +1 -0
- package/dist/http/ws/WebSocketClientOptions.d.ts +77 -0
- package/dist/http/ws/WebSocketClientOptions.d.ts.map +1 -0
- package/dist/http/ws/WebSocketClientOptions.js +69 -0
- package/dist/http/ws/WebSocketClientOptions.js.map +1 -0
- package/dist/http/ws/WebSocketConnectionActor.d.ts +51 -0
- package/dist/http/ws/WebSocketConnectionActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketConnectionActor.js +170 -0
- package/dist/http/ws/WebSocketConnectionActor.js.map +1 -0
- package/dist/http/ws/WebSocketRoute.d.ts +20 -0
- package/dist/http/ws/WebSocketRoute.d.ts.map +1 -0
- package/dist/http/ws/WebSocketRoute.js +44 -0
- package/dist/http/ws/WebSocketRoute.js.map +1 -0
- package/dist/http/ws/WebSocketRouteOptions.d.ts +54 -0
- package/dist/http/ws/WebSocketRouteOptions.d.ts.map +1 -0
- package/dist/http/ws/WebSocketRouteOptions.js +55 -0
- package/dist/http/ws/WebSocketRouteOptions.js.map +1 -0
- package/dist/http/ws/WebSocketServerActor.d.ts +65 -0
- package/dist/http/ws/WebSocketServerActor.d.ts.map +1 -0
- package/dist/http/ws/WebSocketServerActor.js +133 -0
- package/dist/http/ws/WebSocketServerActor.js.map +1 -0
- package/dist/http/ws/WsCodec.d.ts +65 -0
- package/dist/http/ws/WsCodec.d.ts.map +1 -0
- package/dist/http/ws/WsCodec.js +82 -0
- package/dist/http/ws/WsCodec.js.map +1 -0
- package/dist/http/ws/WsConnection.d.ts +59 -0
- package/dist/http/ws/WsConnection.d.ts.map +1 -0
- package/dist/http/ws/WsConnection.js +45 -0
- package/dist/http/ws/WsConnection.js.map +1 -0
- package/dist/http/ws/WsMessages.d.ts +91 -0
- package/dist/http/ws/WsMessages.d.ts.map +1 -0
- package/dist/http/ws/WsMessages.js +90 -0
- package/dist/http/ws/WsMessages.js.map +1 -0
- package/dist/http/ws/WsPolicy.d.ts +32 -0
- package/dist/http/ws/WsPolicy.d.ts.map +1 -0
- package/dist/http/ws/WsPolicy.js +43 -0
- package/dist/http/ws/WsPolicy.js.map +1 -0
- package/dist/http/ws/index.d.ts +22 -0
- package/dist/http/ws/index.d.ts.map +1 -0
- package/dist/http/ws/index.js +15 -0
- package/dist/http/ws/index.js.map +1 -0
- package/dist/http/ws/matchPattern.d.ts +12 -0
- package/dist/http/ws/matchPattern.d.ts.map +1 -0
- package/dist/http/ws/matchPattern.js +29 -0
- package/dist/http/ws/matchPattern.js.map +1 -0
- package/dist/http/ws/rawResponse.d.ts +15 -0
- package/dist/http/ws/rawResponse.d.ts.map +1 -0
- package/dist/http/ws/rawResponse.js +54 -0
- package/dist/http/ws/rawResponse.js.map +1 -0
- package/dist/http/ws/types.d.ts +70 -0
- package/dist/http/ws/types.d.ts.map +1 -0
- package/dist/http/ws/types.js +81 -0
- package/dist/http/ws/types.js.map +1 -0
- package/dist/http/ws/wsCtor.d.ts +34 -0
- package/dist/http/ws/wsCtor.d.ts.map +1 -0
- package/dist/http/ws/wsCtor.js +38 -0
- package/dist/http/ws/wsCtor.js.map +1 -0
- package/dist/index.d.ts +25 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/ActorCell.d.ts +16 -1
- package/dist/internal/ActorCell.d.ts.map +1 -1
- package/dist/internal/ActorCell.js +32 -2
- package/dist/internal/ActorCell.js.map +1 -1
- package/dist/io/broker/AmqpActor.d.ts +19 -16
- package/dist/io/broker/AmqpActor.d.ts.map +1 -1
- package/dist/io/broker/AmqpActor.js +13 -5
- package/dist/io/broker/AmqpActor.js.map +1 -1
- package/dist/io/broker/AmqpOptions.d.ts +41 -0
- package/dist/io/broker/AmqpOptions.d.ts.map +1 -0
- package/dist/io/broker/AmqpOptions.js +34 -0
- package/dist/io/broker/AmqpOptions.js.map +1 -0
- package/dist/io/broker/BrokerActor.d.ts +4 -3
- package/dist/io/broker/BrokerActor.d.ts.map +1 -1
- package/dist/io/broker/BrokerActor.js +4 -2
- package/dist/io/broker/BrokerActor.js.map +1 -1
- package/dist/io/broker/BrokerOptions.d.ts +24 -0
- package/dist/io/broker/BrokerOptions.d.ts.map +1 -0
- package/dist/io/broker/BrokerOptions.js +29 -0
- package/dist/io/broker/BrokerOptions.js.map +1 -0
- package/dist/io/broker/BrokerSettings.d.ts +2 -2
- package/dist/io/broker/BrokerSettings.d.ts.map +1 -1
- package/dist/io/broker/BrokerSettings.js.map +1 -1
- package/dist/io/broker/GrpcClientActor.d.ts +6 -19
- package/dist/io/broker/GrpcClientActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcClientActor.js +1 -1
- package/dist/io/broker/GrpcClientActor.js.map +1 -1
- package/dist/io/broker/GrpcClientOptions.d.ts +48 -0
- package/dist/io/broker/GrpcClientOptions.d.ts.map +1 -0
- package/dist/io/broker/GrpcClientOptions.js +42 -0
- package/dist/io/broker/GrpcClientOptions.js.map +1 -0
- package/dist/io/broker/GrpcServerActor.d.ts +3 -24
- package/dist/io/broker/GrpcServerActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcServerActor.js +3 -3
- package/dist/io/broker/GrpcServerActor.js.map +1 -1
- package/dist/io/broker/GrpcServerOptions.d.ts +58 -0
- package/dist/io/broker/GrpcServerOptions.d.ts.map +1 -0
- package/dist/io/broker/GrpcServerOptions.js +44 -0
- package/dist/io/broker/GrpcServerOptions.js.map +1 -0
- package/dist/io/broker/JetStreamActor.d.ts +13 -35
- package/dist/io/broker/JetStreamActor.d.ts.map +1 -1
- package/dist/io/broker/JetStreamActor.js +2 -2
- package/dist/io/broker/JetStreamActor.js.map +1 -1
- package/dist/io/broker/JetStreamOptions.d.ts +64 -0
- package/dist/io/broker/JetStreamOptions.d.ts.map +1 -0
- package/dist/io/broker/JetStreamOptions.js +54 -0
- package/dist/io/broker/JetStreamOptions.js.map +1 -0
- package/dist/io/broker/KafkaActor.d.ts +13 -54
- package/dist/io/broker/KafkaActor.d.ts.map +1 -1
- package/dist/io/broker/KafkaActor.js +20 -8
- package/dist/io/broker/KafkaActor.js.map +1 -1
- package/dist/io/broker/KafkaOptions.d.ts +82 -0
- package/dist/io/broker/KafkaOptions.d.ts.map +1 -0
- package/dist/io/broker/KafkaOptions.js +50 -0
- package/dist/io/broker/KafkaOptions.js.map +1 -0
- package/dist/io/broker/MqttActor.d.ts +174 -114
- package/dist/io/broker/MqttActor.d.ts.map +1 -1
- package/dist/io/broker/MqttActor.js +328 -103
- package/dist/io/broker/MqttActor.js.map +1 -1
- package/dist/io/broker/MqttCodec.d.ts +70 -0
- package/dist/io/broker/MqttCodec.d.ts.map +1 -0
- package/dist/io/broker/MqttCodec.js +98 -0
- package/dist/io/broker/MqttCodec.js.map +1 -0
- package/dist/io/broker/MqttMessages.d.ts +145 -0
- package/dist/io/broker/MqttMessages.d.ts.map +1 -0
- package/dist/io/broker/MqttMessages.js +102 -0
- package/dist/io/broker/MqttMessages.js.map +1 -0
- package/dist/io/broker/MqttOptions.d.ts +100 -0
- package/dist/io/broker/MqttOptions.d.ts.map +1 -0
- package/dist/io/broker/MqttOptions.js +73 -0
- package/dist/io/broker/MqttOptions.js.map +1 -0
- package/dist/io/broker/NatsActor.d.ts +6 -21
- package/dist/io/broker/NatsActor.d.ts.map +1 -1
- package/dist/io/broker/NatsActor.js +1 -1
- package/dist/io/broker/NatsActor.js.map +1 -1
- package/dist/io/broker/NatsOptions.d.ts +51 -0
- package/dist/io/broker/NatsOptions.d.ts.map +1 -0
- package/dist/io/broker/NatsOptions.js +42 -0
- package/dist/io/broker/NatsOptions.js.map +1 -0
- package/dist/io/broker/RedisStreamsActor.d.ts +6 -24
- package/dist/io/broker/RedisStreamsActor.d.ts.map +1 -1
- package/dist/io/broker/RedisStreamsActor.js +1 -1
- package/dist/io/broker/RedisStreamsActor.js.map +1 -1
- package/dist/io/broker/RedisStreamsOptions.d.ts +51 -0
- package/dist/io/broker/RedisStreamsOptions.d.ts.map +1 -0
- package/dist/io/broker/RedisStreamsOptions.js +38 -0
- package/dist/io/broker/RedisStreamsOptions.js.map +1 -0
- package/dist/io/broker/SseActor.d.ts +6 -15
- package/dist/io/broker/SseActor.d.ts.map +1 -1
- package/dist/io/broker/SseActor.js +1 -1
- package/dist/io/broker/SseActor.js.map +1 -1
- package/dist/io/broker/SseOptions.d.ts +38 -0
- package/dist/io/broker/SseOptions.d.ts.map +1 -0
- package/dist/io/broker/SseOptions.js +30 -0
- package/dist/io/broker/SseOptions.js.map +1 -0
- package/dist/io/broker/TcpSocketActor.d.ts +6 -21
- package/dist/io/broker/TcpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/TcpSocketActor.js +1 -1
- package/dist/io/broker/TcpSocketActor.js.map +1 -1
- package/dist/io/broker/TcpSocketOptions.d.ts +46 -0
- package/dist/io/broker/TcpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/TcpSocketOptions.js +34 -0
- package/dist/io/broker/TcpSocketOptions.js.map +1 -0
- package/dist/io/broker/UdpSocketActor.d.ts +6 -17
- package/dist/io/broker/UdpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/UdpSocketActor.js +1 -1
- package/dist/io/broker/UdpSocketActor.js.map +1 -1
- package/dist/io/broker/UdpSocketOptions.d.ts +42 -0
- package/dist/io/broker/UdpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/UdpSocketOptions.js +34 -0
- package/dist/io/broker/UdpSocketOptions.js.map +1 -0
- package/dist/io/broker/index.d.ts +39 -19
- package/dist/io/broker/index.d.ts.map +1 -1
- package/dist/io/broker/index.js +21 -4
- package/dist/io/broker/index.js.map +1 -1
- package/dist/mailbox/BoundedMailbox.d.ts +12 -0
- package/dist/mailbox/BoundedMailbox.d.ts.map +1 -1
- package/dist/mailbox/BoundedMailbox.js +7 -1
- package/dist/mailbox/BoundedMailbox.js.map +1 -1
- package/dist/management/HttpManagement.d.ts +34 -1
- package/dist/management/HttpManagement.d.ts.map +1 -1
- package/dist/management/HttpManagement.js +30 -4
- package/dist/management/HttpManagement.js.map +1 -1
- package/dist/metrics/PromClientAdapter.d.ts +2 -12
- package/dist/metrics/PromClientAdapter.d.ts.map +1 -1
- package/dist/metrics/PromClientAdapter.js +2 -2
- package/dist/metrics/PromClientAdapter.js.map +1 -1
- package/dist/metrics/PromClientAdapterOptions.d.ts +46 -0
- package/dist/metrics/PromClientAdapterOptions.d.ts.map +1 -0
- package/dist/metrics/PromClientAdapterOptions.js +35 -0
- package/dist/metrics/PromClientAdapterOptions.js.map +1 -0
- package/dist/metrics/index.d.ts +3 -1
- package/dist/metrics/index.d.ts.map +1 -1
- package/dist/metrics/index.js +1 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/persistence/DurableStateActor.d.ts +4 -9
- package/dist/persistence/DurableStateActor.d.ts.map +1 -1
- package/dist/persistence/DurableStateActor.js +3 -3
- package/dist/persistence/DurableStateActor.js.map +1 -1
- package/dist/persistence/DurableStateOptions.d.ts +40 -0
- package/dist/persistence/DurableStateOptions.d.ts.map +1 -0
- package/dist/persistence/DurableStateOptions.js +36 -0
- package/dist/persistence/DurableStateOptions.js.map +1 -0
- package/dist/persistence/PersistenceOptions.d.ts +45 -0
- package/dist/persistence/PersistenceOptions.d.ts.map +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.d.ts.map +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.js +2 -2
- package/dist/persistence/ReplicatedEventSourcedActor.js.map +1 -1
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts +32 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js +120 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts +38 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js +38 -0
- package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts +4 -9
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js +49 -7
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts +61 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js +42 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js +121 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js +38 -0
- package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js.map +1 -0
- package/dist/persistence/index.d.ts +59 -16
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +33 -2
- package/dist/persistence/index.js.map +1 -1
- package/dist/persistence/journals/CassandraJournal.d.ts +1 -48
- package/dist/persistence/journals/CassandraJournal.d.ts.map +1 -1
- package/dist/persistence/journals/CassandraJournal.js +2 -2
- package/dist/persistence/journals/CassandraJournal.js.map +1 -1
- package/dist/persistence/journals/CassandraJournalOptions.d.ts +107 -0
- package/dist/persistence/journals/CassandraJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/CassandraJournalOptions.js +90 -0
- package/dist/persistence/journals/CassandraJournalOptions.js.map +1 -0
- package/dist/persistence/journals/CassandraPlugin.d.ts +1 -16
- package/dist/persistence/journals/CassandraPlugin.d.ts.map +1 -1
- package/dist/persistence/journals/CassandraPlugin.js +9 -4
- package/dist/persistence/journals/CassandraPlugin.js.map +1 -1
- package/dist/persistence/journals/CassandraPluginOptions.d.ts +51 -0
- package/dist/persistence/journals/CassandraPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/CassandraPluginOptions.js +37 -0
- package/dist/persistence/journals/CassandraPluginOptions.js.map +1 -0
- package/dist/persistence/journals/MariaDbClient.d.ts +54 -0
- package/dist/persistence/journals/MariaDbClient.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbClient.js +40 -0
- package/dist/persistence/journals/MariaDbClient.js.map +1 -0
- package/dist/persistence/journals/MariaDbJournal.d.ts +29 -0
- package/dist/persistence/journals/MariaDbJournal.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbJournal.js +161 -0
- package/dist/persistence/journals/MariaDbJournal.js.map +1 -0
- package/dist/persistence/journals/MariaDbJournalOptions.d.ts +43 -0
- package/dist/persistence/journals/MariaDbJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbJournalOptions.js +43 -0
- package/dist/persistence/journals/MariaDbJournalOptions.js.map +1 -0
- package/dist/persistence/journals/MariaDbPlugin.d.ts +27 -0
- package/dist/persistence/journals/MariaDbPlugin.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbPlugin.js +30 -0
- package/dist/persistence/journals/MariaDbPlugin.js.map +1 -0
- package/dist/persistence/journals/MariaDbPluginOptions.d.ts +52 -0
- package/dist/persistence/journals/MariaDbPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/MariaDbPluginOptions.js +38 -0
- package/dist/persistence/journals/MariaDbPluginOptions.js.map +1 -0
- package/dist/persistence/journals/PostgresClient.d.ts +56 -0
- package/dist/persistence/journals/PostgresClient.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresClient.js +35 -0
- package/dist/persistence/journals/PostgresClient.js.map +1 -0
- package/dist/persistence/journals/PostgresJournal.d.ts +41 -0
- package/dist/persistence/journals/PostgresJournal.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresJournal.js +176 -0
- package/dist/persistence/journals/PostgresJournal.js.map +1 -0
- package/dist/persistence/journals/PostgresJournalOptions.d.ts +44 -0
- package/dist/persistence/journals/PostgresJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresJournalOptions.js +44 -0
- package/dist/persistence/journals/PostgresJournalOptions.js.map +1 -0
- package/dist/persistence/journals/PostgresPlugin.d.ts +32 -0
- package/dist/persistence/journals/PostgresPlugin.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresPlugin.js +35 -0
- package/dist/persistence/journals/PostgresPlugin.js.map +1 -0
- package/dist/persistence/journals/PostgresPluginOptions.d.ts +54 -0
- package/dist/persistence/journals/PostgresPluginOptions.d.ts.map +1 -0
- package/dist/persistence/journals/PostgresPluginOptions.js +39 -0
- package/dist/persistence/journals/PostgresPluginOptions.js.map +1 -0
- package/dist/persistence/journals/SqliteJournal.d.ts +5 -19
- package/dist/persistence/journals/SqliteJournal.d.ts.map +1 -1
- package/dist/persistence/journals/SqliteJournal.js +10 -9
- package/dist/persistence/journals/SqliteJournal.js.map +1 -1
- package/dist/persistence/journals/SqliteJournalOptions.d.ts +41 -0
- package/dist/persistence/journals/SqliteJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/SqliteJournalOptions.js +31 -0
- package/dist/persistence/journals/SqliteJournalOptions.js.map +1 -0
- package/dist/persistence/object-storage/BodyCodec.d.ts +43 -0
- package/dist/persistence/object-storage/BodyCodec.d.ts.map +1 -1
- package/dist/persistence/object-storage/BodyCodec.js +78 -20
- package/dist/persistence/object-storage/BodyCodec.js.map +1 -1
- package/dist/persistence/object-storage/Compression.d.ts +21 -7
- package/dist/persistence/object-storage/Compression.d.ts.map +1 -1
- package/dist/persistence/object-storage/Compression.js +79 -29
- package/dist/persistence/object-storage/Compression.js.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts +2 -61
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js +56 -11
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts +45 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js +30 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js.map +1 -0
- package/dist/persistence/object-storage/Integrity.d.ts +43 -0
- package/dist/persistence/object-storage/Integrity.d.ts.map +1 -0
- package/dist/persistence/object-storage/Integrity.js +66 -0
- package/dist/persistence/object-storage/Integrity.js.map +1 -0
- package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts +6 -22
- package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePlugin.js +36 -28
- package/dist/persistence/object-storage/ObjectStoragePlugin.js.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts +60 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.js +52 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.js.map +1 -0
- package/dist/persistence/object-storage/PluginConfig.d.ts +5 -2
- package/dist/persistence/object-storage/PluginConfig.d.ts.map +1 -1
- package/dist/persistence/object-storage/PluginConfig.js +8 -0
- package/dist/persistence/object-storage/PluginConfig.js.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts +1 -30
- package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageBackend.js +12 -7
- package/dist/persistence/object-storage/S3ObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts +64 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.js +42 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.js.map +1 -0
- package/dist/persistence/object-storage/reEncryptionSweep.d.ts +72 -0
- package/dist/persistence/object-storage/reEncryptionSweep.d.ts.map +1 -1
- package/dist/persistence/object-storage/reEncryptionSweep.js +82 -2
- package/dist/persistence/object-storage/reEncryptionSweep.js.map +1 -1
- package/dist/persistence/projection/ProjectionActor.d.ts +4 -24
- package/dist/persistence/projection/ProjectionActor.d.ts.map +1 -1
- package/dist/persistence/projection/ProjectionActor.js +36 -2
- package/dist/persistence/projection/ProjectionActor.js.map +1 -1
- package/dist/persistence/projection/ProjectionOptions.d.ts +109 -0
- package/dist/persistence/projection/ProjectionOptions.d.ts.map +1 -0
- package/dist/persistence/projection/ProjectionOptions.js +108 -0
- package/dist/persistence/projection/ProjectionOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts +2 -10
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.js +12 -6
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts +37 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js +31 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts +1 -11
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js +3 -3
- package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts +61 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js +73 -0
- package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts +30 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js +102 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts +42 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js +42 -0
- package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts +2 -15
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js +10 -6
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts +45 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js +38 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts +31 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js +101 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts +42 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js +42 -0
- package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js.map +1 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts +2 -15
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js +7 -6
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts +40 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js +31 -0
- package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js.map +1 -0
- package/dist/runtime/http/BunHonoRunner.d.ts +7 -1
- package/dist/runtime/http/BunHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/BunHonoRunner.js +22 -0
- package/dist/runtime/http/BunHonoRunner.js.map +1 -1
- package/dist/runtime/http/DenoHonoRunner.d.ts +5 -2
- package/dist/runtime/http/DenoHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/DenoHonoRunner.js +19 -2
- package/dist/runtime/http/DenoHonoRunner.js.map +1 -1
- package/dist/runtime/http/HonoServerRunner.d.ts +39 -0
- package/dist/runtime/http/HonoServerRunner.d.ts.map +1 -1
- package/dist/runtime/http/NodeHonoRunner.d.ts +3 -1
- package/dist/runtime/http/NodeHonoRunner.d.ts.map +1 -1
- package/dist/runtime/http/NodeHonoRunner.js +22 -0
- package/dist/runtime/http/NodeHonoRunner.js.map +1 -1
- package/dist/runtime/http/index.d.ts +1 -1
- package/dist/runtime/http/index.d.ts.map +1 -1
- package/dist/runtime/http/index.js.map +1 -1
- package/dist/testkit/ManualScheduler.d.ts +2 -1
- package/dist/testkit/ManualScheduler.d.ts.map +1 -1
- package/dist/testkit/ManualScheduler.js +2 -1
- package/dist/testkit/ManualScheduler.js.map +1 -1
- package/dist/testkit/MockCluster.d.ts +74 -0
- package/dist/testkit/MockCluster.d.ts.map +1 -0
- package/dist/testkit/MockCluster.js +163 -0
- package/dist/testkit/MockCluster.js.map +1 -0
- package/dist/testkit/MultiNodeClusterFixture.d.ts +62 -0
- package/dist/testkit/MultiNodeClusterFixture.d.ts.map +1 -0
- package/dist/testkit/MultiNodeClusterFixture.js +43 -0
- package/dist/testkit/MultiNodeClusterFixture.js.map +1 -0
- package/dist/testkit/MultiNodeSpec.d.ts +45 -3
- package/dist/testkit/MultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/MultiNodeSpec.js +108 -14
- package/dist/testkit/MultiNodeSpec.js.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpec.d.ts +12 -2
- package/dist/testkit/ParallelMultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpec.js +49 -4
- package/dist/testkit/ParallelMultiNodeSpec.js.map +1 -1
- package/dist/testkit/SnapshotMigrationTest.d.ts +86 -0
- package/dist/testkit/SnapshotMigrationTest.d.ts.map +1 -0
- package/dist/testkit/SnapshotMigrationTest.js +77 -0
- package/dist/testkit/SnapshotMigrationTest.js.map +1 -0
- package/dist/testkit/TestKit.d.ts +6 -8
- package/dist/testkit/TestKit.d.ts.map +1 -1
- package/dist/testkit/TestKit.js +10 -6
- package/dist/testkit/TestKit.js.map +1 -1
- package/dist/testkit/TestKitOptions.d.ts +26 -0
- package/dist/testkit/TestKitOptions.d.ts.map +1 -0
- package/dist/testkit/TestKitOptions.js +19 -0
- package/dist/testkit/TestKitOptions.js.map +1 -0
- package/dist/testkit/TestProbe.d.ts +2 -7
- package/dist/testkit/TestProbe.d.ts.map +1 -1
- package/dist/testkit/TestProbe.js +2 -1
- package/dist/testkit/TestProbe.js.map +1 -1
- package/dist/testkit/TestProbeOptions.d.ts +26 -0
- package/dist/testkit/TestProbeOptions.d.ts.map +1 -0
- package/dist/testkit/TestProbeOptions.js +19 -0
- package/dist/testkit/TestProbeOptions.js.map +1 -0
- package/dist/testkit/index.d.ts +10 -2
- package/dist/testkit/index.d.ts.map +1 -1
- package/dist/testkit/index.js +5 -0
- package/dist/testkit/index.js.map +1 -1
- package/dist/testkit/internal/parallel-multi-node-bootstrap.d.ts.map +1 -1
- package/dist/testkit/internal/parallel-multi-node-bootstrap.js +16 -12
- package/dist/testkit/internal/parallel-multi-node-bootstrap.js.map +1 -1
- package/dist/tracing/OtelAdapter.d.ts +4 -12
- package/dist/tracing/OtelAdapter.d.ts.map +1 -1
- package/dist/tracing/OtelAdapter.js +4 -2
- package/dist/tracing/OtelAdapter.js.map +1 -1
- package/dist/tracing/OtelAdapterOptions.d.ts +42 -0
- package/dist/tracing/OtelAdapterOptions.d.ts.map +1 -0
- package/dist/tracing/OtelAdapterOptions.js +34 -0
- package/dist/tracing/OtelAdapterOptions.js.map +1 -0
- package/dist/tracing/OtelLogsAdapter.d.ts +100 -0
- package/dist/tracing/OtelLogsAdapter.d.ts.map +1 -0
- package/dist/tracing/OtelLogsAdapter.js +130 -0
- package/dist/tracing/OtelLogsAdapter.js.map +1 -0
- package/dist/tracing/index.d.ts +5 -1
- package/dist/tracing/index.d.ts.map +1 -1
- package/dist/tracing/index.js +2 -0
- package/dist/tracing/index.js.map +1 -1
- package/dist/util/Constants.d.ts +23 -0
- package/dist/util/Constants.d.ts.map +1 -1
- package/dist/util/Constants.js +23 -0
- package/dist/util/Constants.js.map +1 -1
- package/dist/util/Lazy.d.ts +31 -0
- package/dist/util/Lazy.d.ts.map +1 -1
- package/dist/util/Lazy.js +70 -0
- package/dist/util/Lazy.js.map +1 -1
- package/dist/util/OptionsBuilder.d.ts +48 -0
- package/dist/util/OptionsBuilder.d.ts.map +1 -0
- package/dist/util/OptionsBuilder.js +53 -0
- package/dist/util/OptionsBuilder.js.map +1 -0
- package/dist/worker/WorkerCluster.d.ts +2 -11
- package/dist/worker/WorkerCluster.d.ts.map +1 -1
- package/dist/worker/WorkerCluster.js +2 -1
- package/dist/worker/WorkerCluster.js.map +1 -1
- package/dist/worker/WorkerClusterOptions.d.ts +55 -0
- package/dist/worker/WorkerClusterOptions.d.ts.map +1 -0
- package/dist/worker/WorkerClusterOptions.js +55 -0
- package/dist/worker/WorkerClusterOptions.js.map +1 -0
- package/dist/worker/index.d.ts +3 -1
- package/dist/worker/index.d.ts.map +1 -1
- package/dist/worker/index.js +1 -0
- package/dist/worker/index.js.map +1 -1
- package/package.json +56 -13
- package/dist/io/broker/ServerWebSocketActor.d.ts +0 -109
- package/dist/io/broker/ServerWebSocketActor.d.ts.map +0 -1
- package/dist/io/broker/ServerWebSocketActor.js +0 -128
- package/dist/io/broker/ServerWebSocketActor.js.map +0 -1
- package/dist/io/broker/WebSocketActor.d.ts +0 -77
- package/dist/io/broker/WebSocketActor.d.ts.map +0 -1
- package/dist/io/broker/WebSocketActor.js +0 -217
- package/dist/io/broker/WebSocketActor.js.map +0 -1
- package/dist/io/broker/WebSocketServerAdapters.d.ts +0 -140
- package/dist/io/broker/WebSocketServerAdapters.d.ts.map +0 -1
- package/dist/io/broker/WebSocketServerAdapters.js +0 -155
- package/dist/io/broker/WebSocketServerAdapters.js.map +0 -1
|
@@ -42,17 +42,30 @@ import { DEFAULT_ASK_TIMEOUT_MS } from '../util/Constants.js';
|
|
|
42
42
|
import { NodeAddress } from './NodeAddress.js';
|
|
43
43
|
import { encodeFrame, FrameDecoder } from './Protocol.js';
|
|
44
44
|
const HELLO_TIMEOUT_MS = 5_000;
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Generate an unpredictable ask ID. Used by `ClusterClient.ask()` to
|
|
47
|
+
* route a `cluster-client-reply` frame back to the right pending
|
|
48
|
+
* promise.
|
|
49
|
+
*
|
|
50
|
+
* **Security note (#120)**: previously this was `c${Date.now()}-${counter}`,
|
|
51
|
+
* which an attacker on the wire (MitM on plaintext, malicious cluster
|
|
52
|
+
* peer, or someone with frame-level write access via TLS-stripping
|
|
53
|
+
* proxy) could predict and use to inject a forged reply BEFORE the
|
|
54
|
+
* legitimate one arrives. `crypto.randomUUID()` gives 122 bits of
|
|
55
|
+
* entropy per call — guessing the next ID is computationally
|
|
56
|
+
* infeasible. Frame replies whose ID doesn't match a current
|
|
57
|
+
* pending entry are dropped by `handleReply()` (existing behaviour).
|
|
58
|
+
*/
|
|
46
59
|
function nextAskId() {
|
|
47
|
-
|
|
48
|
-
return `c${Date.now()}-${_askCounter}`;
|
|
60
|
+
return globalThis.crypto.randomUUID();
|
|
49
61
|
}
|
|
62
|
+
/** @internal — test-only handle for the predictability regression. */
|
|
63
|
+
export const _nextAskIdForTest = nextAskId;
|
|
50
64
|
/**
|
|
51
65
|
* Connect to a cluster via one of the listed contact-points and exchange
|
|
52
66
|
* messages with actors on the cluster. See the file header for scope.
|
|
53
67
|
*/
|
|
54
68
|
export class ClusterClient {
|
|
55
|
-
settings;
|
|
56
69
|
contactPoints;
|
|
57
70
|
identity;
|
|
58
71
|
tls;
|
|
@@ -66,7 +79,9 @@ export class ClusterClient {
|
|
|
66
79
|
stopped = false;
|
|
67
80
|
/** Filled by `hello-ack`; the contact-point's real address (post-handshake). */
|
|
68
81
|
contactPointPeer = null;
|
|
69
|
-
|
|
82
|
+
settings;
|
|
83
|
+
constructor(options) {
|
|
84
|
+
const settings = options;
|
|
70
85
|
this.settings = settings;
|
|
71
86
|
if (!settings.contactPoints || settings.contactPoints.length === 0) {
|
|
72
87
|
throw new Error('ClusterClient: contactPoints must contain at least one entry');
|
|
@@ -86,7 +101,7 @@ export class ClusterClient {
|
|
|
86
101
|
this.identity = new NodeAddress(sysName, id.host, id.port);
|
|
87
102
|
this.tls = settings.tls ?? null;
|
|
88
103
|
this.askTimeoutMs = settings.askTimeoutMs ?? DEFAULT_ASK_TIMEOUT_MS;
|
|
89
|
-
this.log = settings.
|
|
104
|
+
this.log = settings.logger ?? new ConsoleLogger(LogLevel.Warn, 'cluster-client');
|
|
90
105
|
}
|
|
91
106
|
/** The synthetic identity this client uses in its `hello` handshake. */
|
|
92
107
|
get clientAddress() { return this.identity; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterClient.js","sourceRoot":"","sources":["../../src/cluster/ClusterClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,aAAa,EAAiD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAe,MAAM,cAAc,CAAC;AACpE,O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AAC;YACb,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CACtB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CACzE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEO,aAAa;QACnB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QAClC,gEAAgE;QAChE,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC,CAAC;YAC7E,KAAK,EAAE,CAAC;QACV,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAEO,UAAU,CAAC,GAAgB;QACjC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;QACrG,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { TlsTransportSettings } from '../runtime/tcp/index.js';
|
|
2
|
+
import type { Logger } from '../Logger.js';
|
|
3
|
+
import { OptionsBuilder } from '../util/OptionsBuilder.js';
|
|
4
|
+
/** Plain settings-object shape accepted by a {@link ClusterClient}. */
|
|
5
|
+
export interface ClusterClientOptionsType {
|
|
6
|
+
/**
|
|
7
|
+
* Cluster nodes to dial. Each is a `host:port` or `<system>@host:port`
|
|
8
|
+
* string — the same shape `Cluster.join` accepts for seeds. Tried in
|
|
9
|
+
* order; on dial failure the next is attempted.
|
|
10
|
+
*/
|
|
11
|
+
readonly contactPoints: ReadonlyArray<string>;
|
|
12
|
+
/** Synthetic system name embedded in the client's hello. Default: 'cluster-client'. */
|
|
13
|
+
readonly systemName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Host + port the client claims as its identity. The cluster uses this
|
|
16
|
+
* to route `cluster-client-reply` frames back over the right connection.
|
|
17
|
+
* Use a host:port that uniquely identifies this client instance — random
|
|
18
|
+
* defaults are fine because the cluster only needs it for connection
|
|
19
|
+
* routing, not for actual networking back to the client.
|
|
20
|
+
*/
|
|
21
|
+
readonly clientIdentity?: {
|
|
22
|
+
readonly host: string;
|
|
23
|
+
readonly port: number;
|
|
24
|
+
};
|
|
25
|
+
/** Default ask timeout (ms). Default: 5_000. */
|
|
26
|
+
readonly askTimeoutMs?: number;
|
|
27
|
+
/** Optional TLS config — must match the cluster's. */
|
|
28
|
+
readonly tls?: TlsTransportSettings;
|
|
29
|
+
/** Custom logger; default: ConsoleLogger at WARN. */
|
|
30
|
+
readonly logger?: Logger;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fluent builder for {@link ClusterClientOptionsType}:
|
|
34
|
+
*
|
|
35
|
+
* new ClusterClient(
|
|
36
|
+
* ClusterClientOptions.create()
|
|
37
|
+
* .withContactPoints(['sys@127.0.0.1:2551'])
|
|
38
|
+
* .withAskTimeoutMs(3_000),
|
|
39
|
+
* );
|
|
40
|
+
*/
|
|
41
|
+
export declare class ClusterClientOptionsBuilder extends OptionsBuilder<ClusterClientOptionsType> {
|
|
42
|
+
/** Start a fresh builder. Equivalent to `new ClusterClientOptionsBuilder()`. */
|
|
43
|
+
static create(): ClusterClientOptionsBuilder;
|
|
44
|
+
/** Cluster nodes to dial (`host:port` or `<system>@host:port`). Tried in order. */
|
|
45
|
+
withContactPoints(contactPoints: ReadonlyArray<string>): this;
|
|
46
|
+
/** Synthetic system name embedded in the client's hello. Default `cluster-client`. */
|
|
47
|
+
withSystemName(systemName: string): this;
|
|
48
|
+
/** Host + port the client claims as its identity for reply routing. */
|
|
49
|
+
withClientIdentity(host: string, port: number): this;
|
|
50
|
+
/** Default ask timeout in ms. Default 5 s. */
|
|
51
|
+
withAskTimeoutMs(ms: number): this;
|
|
52
|
+
/** TLS config — must match the cluster's. */
|
|
53
|
+
withTls(tls: TlsTransportSettings): this;
|
|
54
|
+
/** Custom logger; default ConsoleLogger at WARN. */
|
|
55
|
+
withLogger(logger: Logger): this;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Accepted input for the {@link ClusterClient} constructor: the fluent
|
|
59
|
+
* {@link ClusterClientOptionsBuilder} OR a plain
|
|
60
|
+
* {@link ClusterClientOptionsType} object.
|
|
61
|
+
*/
|
|
62
|
+
export type ClusterClientOptions = ClusterClientOptionsBuilder | Partial<ClusterClientOptionsType>;
|
|
63
|
+
/** Value alias so `ClusterClientOptions.create()` / `new ClusterClientOptions()` resolve to the builder. */
|
|
64
|
+
export declare const ClusterClientOptions: typeof ClusterClientOptionsBuilder;
|
|
65
|
+
//# sourceMappingURL=ClusterClientOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterClientOptions.d.ts","sourceRoot":"","sources":["../../src/cluster/ClusterClientOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,uEAAuE;AACvE,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,C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2
|
+
/**
|
|
3
|
+
* Fluent builder for {@link ClusterClientOptionsType}:
|
|
4
|
+
*
|
|
5
|
+
* new ClusterClient(
|
|
6
|
+
* ClusterClientOptions.create()
|
|
7
|
+
* .withContactPoints(['sys@127.0.0.1:2551'])
|
|
8
|
+
* .withAskTimeoutMs(3_000),
|
|
9
|
+
* );
|
|
10
|
+
*/
|
|
11
|
+
export class ClusterClientOptionsBuilder extends OptionsBuilder {
|
|
12
|
+
/** Start a fresh builder. Equivalent to `new ClusterClientOptionsBuilder()`. */
|
|
13
|
+
static create() {
|
|
14
|
+
return new ClusterClientOptionsBuilder();
|
|
15
|
+
}
|
|
16
|
+
/** Cluster nodes to dial (`host:port` or `<system>@host:port`). Tried in order. */
|
|
17
|
+
withContactPoints(contactPoints) {
|
|
18
|
+
return this.set('contactPoints', contactPoints);
|
|
19
|
+
}
|
|
20
|
+
/** Synthetic system name embedded in the client's hello. Default `cluster-client`. */
|
|
21
|
+
withSystemName(systemName) {
|
|
22
|
+
return this.set('systemName', systemName);
|
|
23
|
+
}
|
|
24
|
+
/** Host + port the client claims as its identity for reply routing. */
|
|
25
|
+
withClientIdentity(host, port) {
|
|
26
|
+
return this.set('clientIdentity', { host, port });
|
|
27
|
+
}
|
|
28
|
+
/** Default ask timeout in ms. Default 5 s. */
|
|
29
|
+
withAskTimeoutMs(ms) {
|
|
30
|
+
return this.set('askTimeoutMs', ms);
|
|
31
|
+
}
|
|
32
|
+
/** TLS config — must match the cluster's. */
|
|
33
|
+
withTls(tls) {
|
|
34
|
+
return this.set('tls', tls);
|
|
35
|
+
}
|
|
36
|
+
/** Custom logger; default ConsoleLogger at WARN. */
|
|
37
|
+
withLogger(logger) {
|
|
38
|
+
return this.set('logger', logger);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Value alias so `ClusterClientOptions.create()` / `new ClusterClientOptions()` resolve to the builder. */
|
|
42
|
+
export const ClusterClientOptions = ClusterClientOptionsBuilder;
|
|
43
|
+
//# sourceMappingURL=ClusterClientOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterClientOptions.js","sourceRoot":"","sources":["../../src/cluster/ClusterClientOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA4B3D;;;;;;;;GAQG;AACH,MAAM,OAAO,2BAA4B,SAAQ,cAAwC;IACvF,iFAAiF;IACjF,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC3C,CAAC;IAED,oFAAoF;IACpF,iBAAiB,CAAC,aAAoC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAClD,CAAC;IAED,uFAAuF;IACvF,cAAc,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,uEAAuE;IACvE,kBAAkB,CAAC,IAAY,EAAE,IAAY;QAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,+CAA+C;IAC/C,gBAAgB,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,6CAA6C;IAC7C,OAAO,CAAC,GAAyB;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,oDAAoD;IACpD,UAAU,CAAC,MAAc;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;CACF;AAQD,4GAA4G;AAC5G,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC"}
|
|
@@ -42,6 +42,7 @@ import type { ActorSystem } from '../ActorSystem.js';
|
|
|
42
42
|
import { type Extension, type ExtensionId } from '../Extension.js';
|
|
43
43
|
import { type NodeAddressData } from './NodeAddress.js';
|
|
44
44
|
import type { Cluster } from './Cluster.js';
|
|
45
|
+
import type { ClusterClientReceptionistOptions } from './ClusterClientReceptionistOptions.js';
|
|
45
46
|
/** Inbound: a client wants to deliver `body` to actor at `to`. */
|
|
46
47
|
export interface ClusterClientEnvelopeMsg {
|
|
47
48
|
readonly t: 'cluster-client-envelope';
|
|
@@ -57,13 +58,6 @@ export interface ClusterClientReplyMsg {
|
|
|
57
58
|
readonly ok: boolean;
|
|
58
59
|
readonly body: unknown;
|
|
59
60
|
}
|
|
60
|
-
export interface ClusterClientReceptionistSettings {
|
|
61
|
-
/**
|
|
62
|
-
* Default ask timeout (ms) when a client envelope carries an `askId`.
|
|
63
|
-
* Default: 5_000.
|
|
64
|
-
*/
|
|
65
|
-
readonly askTimeoutMs?: number;
|
|
66
|
-
}
|
|
67
61
|
/**
|
|
68
62
|
* Per-system extension that runs once `start(cluster)` is called.
|
|
69
63
|
* Registers a wire handler on the cluster transport; calling `stop()`
|
|
@@ -76,7 +70,7 @@ export declare class ClusterClientReceptionist implements Extension {
|
|
|
76
70
|
private _unsubscribe;
|
|
77
71
|
private _cluster;
|
|
78
72
|
constructor(system: ActorSystem);
|
|
79
|
-
start(cluster: Cluster,
|
|
73
|
+
start(cluster: Cluster, options?: ClusterClientReceptionistOptions): void;
|
|
80
74
|
/** Stop accepting client envelopes. Idempotent. */
|
|
81
75
|
stop(): void;
|
|
82
76
|
private sendReply;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterClientReceptionist.d.ts","sourceRoot":"","sources":["../../src/cluster/ClusterClientReceptionist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAe,KAAK,SAAS,EAAE,KA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zB,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,QAAQ,CAAwB;gBAEX,MAAM,EAAE,WAAW;IAEhD,KAAK,CACH,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,gCAAqC,GAC7C,IAAI;IAyDP,oDAAoD;IACpD,IAAI,IAAI,IAAI;IASZ,OAAO,CAAC,SAAS;CAYlB;AAED,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,yBAAyB,CAI5E,CAAC"}
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
import { extensionId } from '../Extension.js';
|
|
42
42
|
import { DEFAULT_ASK_TIMEOUT_MS } from '../util/Constants.js';
|
|
43
43
|
import { NodeAddress } from './NodeAddress.js';
|
|
44
|
+
/* ============================= extension ============================ */
|
|
44
45
|
/**
|
|
45
46
|
* Per-system extension that runs once `start(cluster)` is called.
|
|
46
47
|
* Registers a wire handler on the cluster transport; calling `stop()`
|
|
@@ -55,13 +56,14 @@ export class ClusterClientReceptionist {
|
|
|
55
56
|
constructor(system) {
|
|
56
57
|
this.system = system;
|
|
57
58
|
}
|
|
58
|
-
start(cluster,
|
|
59
|
+
start(cluster, options = {}) {
|
|
59
60
|
if (this._started && this._cluster === cluster)
|
|
60
61
|
return;
|
|
61
62
|
if (this._started) {
|
|
62
63
|
throw new Error('ClusterClientReceptionist is already bound to a different cluster');
|
|
63
64
|
}
|
|
64
65
|
this._cluster = cluster;
|
|
66
|
+
const settings = options;
|
|
65
67
|
const askTimeoutMs = settings.askTimeoutMs ?? DEFAULT_ASK_TIMEOUT_MS;
|
|
66
68
|
const log = this.system.log.withSource(`cluster-client-receptionist@${cluster.selfAddress}`);
|
|
67
69
|
this._unsubscribe = cluster._onWire('cluster-client-envelope', (msg) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterClientReceptionist.js","sourceRoot":"","sources":["../../src/cluster/ClusterClientReceptionist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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|
2
|
+
/** Plain settings-object shape accepted by {@link ClusterClientReceptionist.start}. */
|
|
3
|
+
export interface ClusterClientReceptionistOptionsType {
|
|
4
|
+
/**
|
|
5
|
+
* Default ask timeout (ms) when a client envelope carries an `askId`.
|
|
6
|
+
* Default: 5_000.
|
|
7
|
+
*/
|
|
8
|
+
readonly askTimeoutMs?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fluent builder for {@link ClusterClientReceptionistOptionsType}:
|
|
12
|
+
*
|
|
13
|
+
* receptionist.start(
|
|
14
|
+
* cluster,
|
|
15
|
+
* ClusterClientReceptionistOptions.create().withAskTimeoutMs(3_000),
|
|
16
|
+
* );
|
|
17
|
+
*/
|
|
18
|
+
export declare class ClusterClientReceptionistOptionsBuilder extends OptionsBuilder<ClusterClientReceptionistOptionsType> {
|
|
19
|
+
/** Start a fresh builder. */
|
|
20
|
+
static create(): ClusterClientReceptionistOptionsBuilder;
|
|
21
|
+
/** Default ask timeout (ms) for client envelopes carrying an `askId`. Default 5 s. */
|
|
22
|
+
withAskTimeoutMs(ms: number): this;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Accepted input for {@link ClusterClientReceptionist.start}: the fluent
|
|
26
|
+
* {@link ClusterClientReceptionistOptionsBuilder} OR a plain
|
|
27
|
+
* {@link ClusterClientReceptionistOptionsType} object.
|
|
28
|
+
*/
|
|
29
|
+
export type ClusterClientReceptionistOptions = ClusterClientReceptionistOptionsBuilder | Partial<ClusterClientReceptionistOptionsType>;
|
|
30
|
+
/** Value alias so `ClusterClientReceptionistOptions.create()` / `new ClusterClientReceptionistOptions()` resolve to the builder. */
|
|
31
|
+
export declare const ClusterClientReceptionistOptions: typeof ClusterClientReceptionistOptionsBuilder;
|
|
32
|
+
//# sourceMappingURL=ClusterClientReceptionistOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterClientReceptionistOptions.d.ts","sourceRoot":"","sources":["../../src/cluster/ClusterClientReceptionistOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,uFAAuF;AACvF,MAAM,WAAW,oCAAoC;IACnD;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,qBAAa,uCAAwC,SAAQ,cAAc,CAAC,oCAAoC,CAAC;IAC/G,6BAA6B;IAC7B,MAAM,CAAC,MAAM,IAAI,uCAAuC;IAIxD,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAGnC;AAED;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GACxC,uCAAuC,GACvC,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAClD,oIAAoI;AACpI,eAAO,MAAM,gCAAgC,gDAA0C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../util/OptionsBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Fluent builder for {@link ClusterClientReceptionistOptionsType}:
|
|
4
|
+
*
|
|
5
|
+
* receptionist.start(
|
|
6
|
+
* cluster,
|
|
7
|
+
* ClusterClientReceptionistOptions.create().withAskTimeoutMs(3_000),
|
|
8
|
+
* );
|
|
9
|
+
*/
|
|
10
|
+
export class ClusterClientReceptionistOptionsBuilder extends OptionsBuilder {
|
|
11
|
+
/** Start a fresh builder. */
|
|
12
|
+
static create() {
|
|
13
|
+
return new ClusterClientReceptionistOptionsBuilder();
|
|
14
|
+
}
|
|
15
|
+
/** Default ask timeout (ms) for client envelopes carrying an `askId`. Default 5 s. */
|
|
16
|
+
withAskTimeoutMs(ms) {
|
|
17
|
+
return this.set('askTimeoutMs', ms);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** Value alias so `ClusterClientReceptionistOptions.create()` / `new ClusterClientReceptionistOptions()` resolve to the builder. */
|
|
21
|
+
export const ClusterClientReceptionistOptions = ClusterClientReceptionistOptionsBuilder;
|
|
22
|
+
//# sourceMappingURL=ClusterClientReceptionistOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterClientReceptionistOptions.js","sourceRoot":"","sources":["../../src/cluster/ClusterClientReceptionistOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW3D;;;;;;;GAOG;AACH,MAAM,OAAO,uCAAwC,SAAQ,cAAoD;IAC/G,6BAA6B;IAC7B,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,uCAAuC,EAAE,CAAC;IACvD,CAAC;IAED,uFAAuF;IACvF,gBAAgB,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;CACF;AAUD,oIAAoI;AACpI,MAAM,CAAC,MAAM,gCAAgC,GAAG,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../util/OptionsBuilder.js';
|
|
2
|
+
import type { FailureDetectorOptionsType } from './FailureDetectorOptions.js';
|
|
3
|
+
import type { Transport } from './Transport.js';
|
|
4
|
+
import type { DowningProvider } from './downing/DowningProvider.js';
|
|
5
|
+
/** Plain settings-object shape accepted by {@link Cluster.join}. */
|
|
6
|
+
export interface ClusterOptionsType {
|
|
7
|
+
readonly host: string;
|
|
8
|
+
readonly port: number;
|
|
9
|
+
/** Other nodes this node should try to contact on startup. */
|
|
10
|
+
readonly seeds?: string[];
|
|
11
|
+
/** Role tags exposed to other members — used to constrain sharding placement. */
|
|
12
|
+
readonly roles?: string[];
|
|
13
|
+
/** Failure detector thresholds. */
|
|
14
|
+
readonly failureDetector?: Partial<FailureDetectorOptionsType>;
|
|
15
|
+
/** Override the transport (e.g. InMemoryTransport for tests). */
|
|
16
|
+
readonly transport?: Transport;
|
|
17
|
+
/** How often gossip is pushed to a random reachable peer. */
|
|
18
|
+
readonly gossipIntervalMs?: number;
|
|
19
|
+
/** How often to resend the initial join gossip to seeds until self is Up. */
|
|
20
|
+
readonly seedRetryIntervalMs?: number;
|
|
21
|
+
/**
|
|
22
|
+
* How long to keep a `removed` tombstone in the local members map
|
|
23
|
+
* before pruning it. Tombstones exist so stale gossip from a slow
|
|
24
|
+
* peer can't resurrect a definitively-removed address; the TTL
|
|
25
|
+
* caps their accumulation in long-running clusters with frequent
|
|
26
|
+
* node churn (#75). Default 24 h — comfortably above any
|
|
27
|
+
* realistic gossip-propagation lag.
|
|
28
|
+
*/
|
|
29
|
+
readonly tombstoneTtlMs?: number;
|
|
30
|
+
/**
|
|
31
|
+
* How often the tombstone-prune pass runs. Default 5 min — small
|
|
32
|
+
* enough that a freshly-expired tombstone disappears within one
|
|
33
|
+
* pruning window, large enough to be negligible CPU.
|
|
34
|
+
*/
|
|
35
|
+
readonly tombstonePruneIntervalMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Minimum age before a tombstone is eligible for pruning, regardless
|
|
38
|
+
* of {@link tombstoneTtlMs}. Defaults to `6 × downAfterMs`, which
|
|
39
|
+
* gives a few failure-detector rounds of breathing room so peers
|
|
40
|
+
* that haven't fully converged still see the tombstone before it
|
|
41
|
+
* vanishes. Mostly relevant for tests that set a very low TTL.
|
|
42
|
+
*/
|
|
43
|
+
readonly tombstoneMinRetentionMs?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Auto-promote a `joining` member to `weakly-up` after this many ms if
|
|
46
|
+
* convergence (leader + `up` transition) hasn't happened yet. Set to 0
|
|
47
|
+
* to disable. Default: 0 (disabled — opt-in only).
|
|
48
|
+
*/
|
|
49
|
+
readonly weaklyUpAfterMs?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Optional split-brain resolver. When provided, the cluster invokes
|
|
52
|
+
* `provider.decide(view)` whenever a member transitions to / from
|
|
53
|
+
* `unreachable`, and force-downs every address in the returned set
|
|
54
|
+
* (regardless of failure-detector state). Without a provider, the
|
|
55
|
+
* cluster relies solely on the failure detector's elapsed-time
|
|
56
|
+
* `unreachable → down → removed` cascade — fine for unilateral
|
|
57
|
+
* crashes, weak under network partitions.
|
|
58
|
+
*
|
|
59
|
+
* See `src/cluster/downing/` for the bundled strategies (KeepMajority,
|
|
60
|
+
* KeepOldest, KeepReferee, StaticQuorum, LeaseMajority).
|
|
61
|
+
*/
|
|
62
|
+
readonly downing?: DowningProvider;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Fluent builder for {@link ClusterOptionsType} — the sole input to
|
|
66
|
+
* {@link Cluster.join}. `host` + `port` are required; every other knob
|
|
67
|
+
* is optional. Polymorphic / whole-value fields (`transport`,
|
|
68
|
+
* `downing`, `failureDetector`, `roles`, `seeds`) are passed as-is via a
|
|
69
|
+
* single `withX(value)` — no nested builders.
|
|
70
|
+
*
|
|
71
|
+
* await Cluster.join(
|
|
72
|
+
* system,
|
|
73
|
+
* ClusterOptions.create()
|
|
74
|
+
* .withHost('127.0.0.1')
|
|
75
|
+
* .withPort(2552)
|
|
76
|
+
* .withSeeds(['sys@127.0.0.1:2551']),
|
|
77
|
+
* );
|
|
78
|
+
*/
|
|
79
|
+
export declare class ClusterOptionsBuilder extends OptionsBuilder<ClusterOptionsType> {
|
|
80
|
+
/** Start a fresh builder. Equivalent to `new ClusterOptionsBuilder()`. */
|
|
81
|
+
static create(): ClusterOptionsBuilder;
|
|
82
|
+
/** Bind host. */
|
|
83
|
+
withHost(host: string): this;
|
|
84
|
+
/** Bind port. */
|
|
85
|
+
withPort(port: number): this;
|
|
86
|
+
/** Other nodes this node should try to contact on startup. */
|
|
87
|
+
withSeeds(seeds: string[]): this;
|
|
88
|
+
/** Role tags exposed to other members — constrain sharding placement. */
|
|
89
|
+
withRoles(roles: string[]): this;
|
|
90
|
+
/** Failure-detector thresholds (merged over the built-in defaults). */
|
|
91
|
+
withFailureDetector(failureDetector: Partial<FailureDetectorOptionsType>): this;
|
|
92
|
+
/** Override the transport (e.g. `InMemoryTransport` for tests). */
|
|
93
|
+
withTransport(transport: Transport): this;
|
|
94
|
+
/** How often gossip is pushed to a random reachable peer. */
|
|
95
|
+
withGossipIntervalMs(ms: number): this;
|
|
96
|
+
/** How often to resend the initial join gossip to seeds until self is Up. */
|
|
97
|
+
withSeedRetryIntervalMs(ms: number): this;
|
|
98
|
+
/** How long to keep a `removed` tombstone before pruning it. Default 24 h. */
|
|
99
|
+
withTombstoneTtlMs(ms: number): this;
|
|
100
|
+
/** How often the tombstone-prune pass runs. Default 5 min. */
|
|
101
|
+
withTombstonePruneIntervalMs(ms: number): this;
|
|
102
|
+
/** Minimum age before a tombstone is eligible for pruning. Default `6 × downAfterMs`. */
|
|
103
|
+
withTombstoneMinRetentionMs(ms: number): this;
|
|
104
|
+
/** Auto-promote `joining` → `weakly-up` after this many ms. 0 disables (default). */
|
|
105
|
+
withWeaklyUpAfterMs(ms: number): this;
|
|
106
|
+
/** Optional split-brain resolver (KeepMajority, KeepOldest, …). */
|
|
107
|
+
withDowning(downing: DowningProvider): this;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Accepted input for {@link Cluster.join}: the fluent
|
|
111
|
+
* {@link ClusterOptionsBuilder} OR a plain {@link ClusterOptionsType} object.
|
|
112
|
+
*/
|
|
113
|
+
export type ClusterOptions = ClusterOptionsBuilder | Partial<ClusterOptionsType>;
|
|
114
|
+
/** Value alias so `ClusterOptions.create()` / `new ClusterOptions()` resolve to the builder. */
|
|
115
|
+
export declare const ClusterOptions: typeof ClusterOptionsBuilder;
|
|
116
|
+
//# sourceMappingURL=ClusterOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterOptions.d.ts","sourceRoot":"","sources":["../../src/cluster/ClusterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC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B;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI5B,8DAA8D;IAC9D,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIhC,yEAAyE;IACzE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIhC,uEAAuE;IACvE,mBAAmB,CAAC,eAAe,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,IAAI;IAI/E,mEAAmE;IACnE,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIzC,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAItC,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIzC,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIpC,+DAA+D;IAC/D,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI9C,0FAA0F;IAC1F,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI7C,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIrC,mEAAmE;IACnE,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAG5C;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,gGAAgG;AAChG,eAAO,MAAM,cAAc,8BAAwB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../util/OptionsBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Fluent builder for {@link ClusterOptionsType} — the sole input to
|
|
4
|
+
* {@link Cluster.join}. `host` + `port` are required; every other knob
|
|
5
|
+
* is optional. Polymorphic / whole-value fields (`transport`,
|
|
6
|
+
* `downing`, `failureDetector`, `roles`, `seeds`) are passed as-is via a
|
|
7
|
+
* single `withX(value)` — no nested builders.
|
|
8
|
+
*
|
|
9
|
+
* await Cluster.join(
|
|
10
|
+
* system,
|
|
11
|
+
* ClusterOptions.create()
|
|
12
|
+
* .withHost('127.0.0.1')
|
|
13
|
+
* .withPort(2552)
|
|
14
|
+
* .withSeeds(['sys@127.0.0.1:2551']),
|
|
15
|
+
* );
|
|
16
|
+
*/
|
|
17
|
+
export class ClusterOptionsBuilder extends OptionsBuilder {
|
|
18
|
+
/** Start a fresh builder. Equivalent to `new ClusterOptionsBuilder()`. */
|
|
19
|
+
static create() {
|
|
20
|
+
return new ClusterOptionsBuilder();
|
|
21
|
+
}
|
|
22
|
+
/** Bind host. */
|
|
23
|
+
withHost(host) {
|
|
24
|
+
return this.set('host', host);
|
|
25
|
+
}
|
|
26
|
+
/** Bind port. */
|
|
27
|
+
withPort(port) {
|
|
28
|
+
return this.set('port', port);
|
|
29
|
+
}
|
|
30
|
+
/** Other nodes this node should try to contact on startup. */
|
|
31
|
+
withSeeds(seeds) {
|
|
32
|
+
return this.set('seeds', seeds);
|
|
33
|
+
}
|
|
34
|
+
/** Role tags exposed to other members — constrain sharding placement. */
|
|
35
|
+
withRoles(roles) {
|
|
36
|
+
return this.set('roles', roles);
|
|
37
|
+
}
|
|
38
|
+
/** Failure-detector thresholds (merged over the built-in defaults). */
|
|
39
|
+
withFailureDetector(failureDetector) {
|
|
40
|
+
return this.set('failureDetector', failureDetector);
|
|
41
|
+
}
|
|
42
|
+
/** Override the transport (e.g. `InMemoryTransport` for tests). */
|
|
43
|
+
withTransport(transport) {
|
|
44
|
+
return this.set('transport', transport);
|
|
45
|
+
}
|
|
46
|
+
/** How often gossip is pushed to a random reachable peer. */
|
|
47
|
+
withGossipIntervalMs(ms) {
|
|
48
|
+
return this.set('gossipIntervalMs', ms);
|
|
49
|
+
}
|
|
50
|
+
/** How often to resend the initial join gossip to seeds until self is Up. */
|
|
51
|
+
withSeedRetryIntervalMs(ms) {
|
|
52
|
+
return this.set('seedRetryIntervalMs', ms);
|
|
53
|
+
}
|
|
54
|
+
/** How long to keep a `removed` tombstone before pruning it. Default 24 h. */
|
|
55
|
+
withTombstoneTtlMs(ms) {
|
|
56
|
+
return this.set('tombstoneTtlMs', ms);
|
|
57
|
+
}
|
|
58
|
+
/** How often the tombstone-prune pass runs. Default 5 min. */
|
|
59
|
+
withTombstonePruneIntervalMs(ms) {
|
|
60
|
+
return this.set('tombstonePruneIntervalMs', ms);
|
|
61
|
+
}
|
|
62
|
+
/** Minimum age before a tombstone is eligible for pruning. Default `6 × downAfterMs`. */
|
|
63
|
+
withTombstoneMinRetentionMs(ms) {
|
|
64
|
+
return this.set('tombstoneMinRetentionMs', ms);
|
|
65
|
+
}
|
|
66
|
+
/** Auto-promote `joining` → `weakly-up` after this many ms. 0 disables (default). */
|
|
67
|
+
withWeaklyUpAfterMs(ms) {
|
|
68
|
+
return this.set('weaklyUpAfterMs', ms);
|
|
69
|
+
}
|
|
70
|
+
/** Optional split-brain resolver (KeepMajority, KeepOldest, …). */
|
|
71
|
+
withDowning(downing) {
|
|
72
|
+
return this.set('downing', downing);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** Value alias so `ClusterOptions.create()` / `new ClusterOptions()` resolve to the builder. */
|
|
76
|
+
export const ClusterOptions = ClusterOptionsBuilder;
|
|
77
|
+
//# sourceMappingURL=ClusterOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterOptions.js","sourceRoot":"","sources":["../../src/cluster/ClusterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAiE3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAkC;IAC3E,2EAA2E;IAC3E,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qBAAqB,EAAE,CAAC;IACrC,CAAC;IAED,iBAAiB;IACjB,QAAQ,CAAC,IAAY;QACnB,OAA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,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,sFAAsF;IACtF,mBAAmB,CAAC,EAAU;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,mEAAmE;IACnE,WAAW,CAAC,OAAwB;QAClC,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF;AAOD,gGAAgG;AAChG,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { NodeAddress } from './NodeAddress.js';
|
|
2
2
|
import { type Option } from '../util/Option.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly heartbeatIntervalMs: number;
|
|
6
|
-
/** Time without heartbeat after which a peer is marked unreachable. */
|
|
7
|
-
readonly unreachableAfterMs: number;
|
|
8
|
-
/** Additional time after which an unreachable peer is declared down. */
|
|
9
|
-
readonly downAfterMs: number;
|
|
10
|
-
}
|
|
11
|
-
export declare const defaultFailureDetectorSettings: FailureDetectorSettings;
|
|
3
|
+
import type { FailureDetectorOptions, FailureDetectorOptionsType } from './FailureDetectorOptions.js';
|
|
4
|
+
export declare const defaultFailureDetectorSettings: FailureDetectorOptionsType;
|
|
12
5
|
export type FailureDecision = 'healthy' | 'unreachable' | 'down';
|
|
13
6
|
/**
|
|
14
7
|
* A simple, deterministic failure detector. Every heartbeat bumps the
|
|
@@ -17,9 +10,9 @@ export type FailureDecision = 'healthy' | 'unreachable' | 'down';
|
|
|
17
10
|
* plain elapsed-time limits, which is sufficient for LAN-scale clusters.
|
|
18
11
|
*/
|
|
19
12
|
export declare class FailureDetector {
|
|
20
|
-
private readonly settings;
|
|
21
13
|
private samples;
|
|
22
|
-
|
|
14
|
+
private readonly settings;
|
|
15
|
+
constructor(options?: FailureDetectorOptions);
|
|
23
16
|
/** Record that a message was received from `peer` (any message counts). */
|
|
24
17
|
heartbeat(peer: NodeAddress, now?: number): void;
|
|
25
18
|
/** Record that we know about a peer even if we haven't heard from it yet. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FailureDetector.d.ts","sourceRoot":"","sources":["../../src/cluster/FailureDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FailureDetector.d.ts","sourceRoot":"","sources":["../../src/cluster/FailureDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEtG,eAAO,MAAM,8BAA8B,EAAE,0BAI5C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;AAOjE;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;gBAE1C,OAAO,GAAE,sBAA2B;IAKhD,2EAA2E;IAC3E,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI;IAM5D,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI;IAK3D,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAI/B,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,GAAE,MAAmB,GAAG,eAAe;IASpE,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAI3C,IAAI,QAAQ,IAAI,MAAM,CAA8C;CACrE"}
|
|
@@ -11,10 +11,11 @@ export const defaultFailureDetectorSettings = {
|
|
|
11
11
|
* plain elapsed-time limits, which is sufficient for LAN-scale clusters.
|
|
12
12
|
*/
|
|
13
13
|
export class FailureDetector {
|
|
14
|
-
settings;
|
|
15
14
|
samples = new Map();
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
settings;
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
// Unset builder fields fall through to the built-in defaults.
|
|
18
|
+
this.settings = { ...defaultFailureDetectorSettings, ...options };
|
|
18
19
|
}
|
|
19
20
|
/** Record that a message was received from `peer` (any message counts). */
|
|
20
21
|
heartbeat(peer, now = Date.now()) {
|