actor-ts 0.9.1 → 0.11.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 +703 -1
- package/README.md +294 -269
- package/dist/Actor.d.ts +6 -6
- package/dist/Actor.d.ts.map +1 -1
- package/dist/Actor.js.map +1 -1
- package/dist/ActorContext.d.ts +7 -7
- package/dist/ActorContext.d.ts.map +1 -1
- package/dist/ActorPath.js +8 -8
- package/dist/ActorPath.js.map +1 -1
- package/dist/ActorRef.d.ts +6 -6
- package/dist/ActorRef.d.ts.map +1 -1
- package/dist/ActorRef.js.map +1 -1
- package/dist/ActorSystem.d.ts +3 -38
- package/dist/ActorSystem.d.ts.map +1 -1
- package/dist/ActorSystem.js +23 -23
- 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/CoordinatedShutdown.js +3 -3
- package/dist/CoordinatedShutdown.js.map +1 -1
- 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/Props.d.ts +13 -13
- package/dist/Props.d.ts.map +1 -1
- package/dist/Props.js.map +1 -1
- package/dist/Router.d.ts +4 -4
- package/dist/Router.d.ts.map +1 -1
- package/dist/Router.js +4 -4
- package/dist/Router.js.map +1 -1
- package/dist/Supervision.js +3 -3
- package/dist/Supervision.js.map +1 -1
- package/dist/cache/CacheExtension.d.ts +7 -0
- package/dist/cache/CacheExtension.d.ts.map +1 -1
- package/dist/cache/CacheExtension.js +17 -1
- package/dist/cache/CacheExtension.js.map +1 -1
- package/dist/cache/InMemoryCache.d.ts +39 -0
- package/dist/cache/InMemoryCache.d.ts.map +1 -1
- package/dist/cache/InMemoryCache.js +99 -20
- package/dist/cache/InMemoryCache.js.map +1 -1
- package/dist/cache/InMemoryCacheOptions.d.ts +50 -0
- package/dist/cache/InMemoryCacheOptions.d.ts.map +1 -0
- package/dist/cache/InMemoryCacheOptions.js +51 -0
- package/dist/cache/InMemoryCacheOptions.js.map +1 -0
- package/dist/cache/MemcachedCache.d.ts +2 -12
- package/dist/cache/MemcachedCache.d.ts.map +1 -1
- package/dist/cache/MemcachedCache.js +13 -10
- package/dist/cache/MemcachedCache.js.map +1 -1
- package/dist/cache/MemcachedCacheOptions.d.ts +46 -0
- package/dist/cache/MemcachedCacheOptions.d.ts.map +1 -0
- package/dist/cache/MemcachedCacheOptions.js +42 -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 +16 -13
- package/dist/cache/RedisCache.js.map +1 -1
- package/dist/cache/RedisCacheOptions.d.ts +66 -0
- package/dist/cache/RedisCacheOptions.d.ts.map +1 -0
- package/dist/cache/RedisCacheOptions.js +62 -0
- package/dist/cache/RedisCacheOptions.js.map +1 -0
- package/dist/cache/index.d.ts +8 -2
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +3 -0
- package/dist/cache/index.js.map +1 -1
- package/dist/cluster/Cluster.d.ts +7 -66
- package/dist/cluster/Cluster.d.ts.map +1 -1
- package/dist/cluster/Cluster.js +97 -90
- 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 +37 -23
- package/dist/cluster/ClusterBootstrap.js.map +1 -1
- package/dist/cluster/ClusterBootstrapOptions.d.ts +158 -0
- package/dist/cluster/ClusterBootstrapOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterBootstrapOptions.js +121 -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 +34 -20
- package/dist/cluster/ClusterClient.js.map +1 -1
- package/dist/cluster/ClusterClientOptions.d.ts +76 -0
- package/dist/cluster/ClusterClientOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientOptions.js +61 -0
- package/dist/cluster/ClusterClientOptions.js.map +1 -0
- package/dist/cluster/ClusterClientReceptionist.d.ts +4 -10
- package/dist/cluster/ClusterClientReceptionist.d.ts.map +1 -1
- package/dist/cluster/ClusterClientReceptionist.js +17 -13
- package/dist/cluster/ClusterClientReceptionist.js.map +1 -1
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts +38 -0
- package/dist/cluster/ClusterClientReceptionistOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js +32 -0
- package/dist/cluster/ClusterClientReceptionistOptions.js.map +1 -0
- package/dist/cluster/ClusterOptions.d.ts +122 -0
- package/dist/cluster/ClusterOptions.d.ts.map +1 -0
- package/dist/cluster/ClusterOptions.js +98 -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 +10 -7
- package/dist/cluster/FailureDetector.js.map +1 -1
- package/dist/cluster/FailureDetectorOptions.d.ts +49 -0
- package/dist/cluster/FailureDetectorOptions.d.ts.map +1 -0
- package/dist/cluster/FailureDetectorOptions.js +48 -0
- package/dist/cluster/FailureDetectorOptions.js.map +1 -0
- package/dist/cluster/Member.js +2 -2
- package/dist/cluster/Member.js.map +1 -1
- package/dist/cluster/PhiAccrualFailureDetector.d.ts +4 -20
- package/dist/cluster/PhiAccrualFailureDetector.d.ts.map +1 -1
- package/dist/cluster/PhiAccrualFailureDetector.js +40 -44
- package/dist/cluster/PhiAccrualFailureDetector.js.map +1 -1
- package/dist/cluster/PhiAccrualOptions.d.ts +64 -0
- package/dist/cluster/PhiAccrualOptions.d.ts.map +1 -0
- package/dist/cluster/PhiAccrualOptions.js +68 -0
- package/dist/cluster/PhiAccrualOptions.js.map +1 -0
- package/dist/cluster/Protocol.d.ts +10 -10
- package/dist/cluster/Protocol.d.ts.map +1 -1
- package/dist/cluster/Protocol.js +1 -1
- package/dist/cluster/RefCodec.js +11 -1
- package/dist/cluster/RefCodec.js.map +1 -1
- package/dist/cluster/RemoteActorRef.d.ts +2 -2
- package/dist/cluster/RemoteActorRef.d.ts.map +1 -1
- package/dist/cluster/RemoteActorRef.js.map +1 -1
- package/dist/cluster/Transport.d.ts +3 -3
- package/dist/cluster/Transport.d.ts.map +1 -1
- package/dist/cluster/Transport.js +2 -2
- package/dist/cluster/Transport.js.map +1 -1
- package/dist/cluster/downing/KeepMajority.d.ts +3 -6
- package/dist/cluster/downing/KeepMajority.d.ts.map +1 -1
- package/dist/cluster/downing/KeepMajority.js +6 -6
- package/dist/cluster/downing/KeepMajority.js.map +1 -1
- package/dist/cluster/downing/KeepMajorityOptions.d.ts +26 -0
- package/dist/cluster/downing/KeepMajorityOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepMajorityOptions.js +19 -0
- package/dist/cluster/downing/KeepMajorityOptions.js.map +1 -0
- package/dist/cluster/downing/KeepOldest.d.ts +3 -12
- package/dist/cluster/downing/KeepOldest.d.ts.map +1 -1
- package/dist/cluster/downing/KeepOldest.js +5 -5
- 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 +3 -11
- package/dist/cluster/downing/KeepReferee.d.ts.map +1 -1
- package/dist/cluster/downing/KeepReferee.js +7 -7
- package/dist/cluster/downing/KeepReferee.js.map +1 -1
- package/dist/cluster/downing/KeepRefereeOptions.d.ts +41 -0
- package/dist/cluster/downing/KeepRefereeOptions.d.ts.map +1 -0
- package/dist/cluster/downing/KeepRefereeOptions.js +38 -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 +142 -17
- package/dist/cluster/downing/LeaseMajority.js.map +1 -1
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts +55 -0
- package/dist/cluster/downing/LeaseMajorityOptions.d.ts.map +1 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js +41 -0
- package/dist/cluster/downing/LeaseMajorityOptions.js.map +1 -0
- package/dist/cluster/downing/StaticQuorum.d.ts +3 -8
- package/dist/cluster/downing/StaticQuorum.d.ts.map +1 -1
- package/dist/cluster/downing/StaticQuorum.js +7 -8
- package/dist/cluster/downing/StaticQuorum.js.map +1 -1
- package/dist/cluster/downing/StaticQuorumOptions.d.ts +36 -0
- package/dist/cluster/downing/StaticQuorumOptions.d.ts.map +1 -0
- package/dist/cluster/downing/StaticQuorumOptions.js +33 -0
- package/dist/cluster/downing/StaticQuorumOptions.js.map +1 -0
- package/dist/cluster/downing/index.d.ts +10 -5
- package/dist/cluster/downing/index.d.ts.map +1 -1
- package/dist/cluster/downing/index.js +5 -0
- package/dist/cluster/downing/index.js.map +1 -1
- package/dist/cluster/index.d.ts +37 -22
- package/dist/cluster/index.d.ts.map +1 -1
- package/dist/cluster/index.js +17 -6
- 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 +6 -10
- package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubMediator.js +24 -22
- package/dist/cluster/pubsub/DistributedPubSubMediator.js.map +1 -1
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts +35 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts.map +1 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js +33 -0
- package/dist/cluster/pubsub/DistributedPubSubOptions.js.map +1 -0
- package/dist/cluster/pubsub/Messages.d.ts +5 -5
- package/dist/cluster/pubsub/Messages.d.ts.map +1 -1
- package/dist/cluster/pubsub/Messages.js +2 -2
- package/dist/cluster/pubsub/Messages.js.map +1 -1
- package/dist/cluster/pubsub/index.d.ts +3 -2
- package/dist/cluster/pubsub/index.d.ts.map +1 -1
- package/dist/cluster/pubsub/index.js +2 -1
- 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 +10 -9
- package/dist/cluster/router/ClusterRouter.js.map +1 -1
- package/dist/cluster/router/ClusterRouterOptions.d.ts +70 -0
- package/dist/cluster/router/ClusterRouterOptions.d.ts.map +1 -0
- package/dist/cluster/router/ClusterRouterOptions.js +59 -0
- package/dist/cluster/router/ClusterRouterOptions.js.map +1 -0
- package/dist/cluster/router/ConsistentHashing.d.ts +1 -1
- package/dist/cluster/router/ConsistentHashing.d.ts.map +1 -1
- package/dist/cluster/router/ConsistentHashing.js +16 -16
- package/dist/cluster/router/ConsistentHashing.js.map +1 -1
- 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/AllocationStrategy.js +4 -4
- package/dist/cluster/sharding/AllocationStrategy.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 +20 -66
- package/dist/cluster/sharding/ClusterSharding.d.ts.map +1 -1
- package/dist/cluster/sharding/ClusterSharding.js +65 -39
- 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/ShardAllocator.js +14 -14
- package/dist/cluster/sharding/ShardAllocator.js.map +1 -1
- package/dist/cluster/sharding/ShardCoordinator.d.ts +4 -64
- package/dist/cluster/sharding/ShardCoordinator.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardCoordinator.js +73 -73
- 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 +11 -42
- package/dist/cluster/sharding/ShardRegion.d.ts.map +1 -1
- package/dist/cluster/sharding/ShardRegion.js +20 -20
- 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 +20 -15
- package/dist/cluster/sharding/ShardedDaemonProcess.js.map +1 -1
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts +57 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js +47 -0
- package/dist/cluster/sharding/ShardedDaemonProcessOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts +95 -0
- package/dist/cluster/sharding/ShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/ShardingOptions.js +92 -0
- package/dist/cluster/sharding/ShardingOptions.js.map +1 -0
- package/dist/cluster/sharding/ShardingProtocol.d.ts +6 -6
- package/dist/cluster/sharding/ShardingProtocol.d.ts.map +1 -1
- package/dist/cluster/sharding/StartShardingOptions.d.ts +106 -0
- package/dist/cluster/sharding/StartShardingOptions.d.ts.map +1 -0
- package/dist/cluster/sharding/StartShardingOptions.js +67 -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 +22 -14
- package/dist/cluster/singleton/ClusterSingleton.js.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts +4 -19
- package/dist/cluster/singleton/ClusterSingletonManager.d.ts.map +1 -1
- package/dist/cluster/singleton/ClusterSingletonManager.js +26 -26
- 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/ClusterSingletonProxy.js +2 -2
- package/dist/cluster/singleton/ClusterSingletonProxy.js.map +1 -1
- package/dist/cluster/singleton/StartSingletonOptions.d.ts +70 -0
- package/dist/cluster/singleton/StartSingletonOptions.d.ts.map +1 -0
- package/dist/cluster/singleton/StartSingletonOptions.js +51 -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/Config.js +61 -61
- package/dist/config/Config.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/config/HoconParser.d.ts +2 -2
- package/dist/config/HoconParser.d.ts.map +1 -1
- package/dist/config/HoconParser.js +77 -77
- package/dist/config/HoconParser.js.map +1 -1
- package/dist/config/reference.d.ts.map +1 -1
- package/dist/config/reference.js +24 -0
- package/dist/config/reference.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 +74 -0
- package/dist/coordination/LeaseOptions.d.ts.map +1 -0
- package/dist/coordination/LeaseOptions.js +89 -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 +36 -22
- package/dist/coordination/leases/InMemoryLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLease.d.ts +20 -25
- package/dist/coordination/leases/KubernetesLease.d.ts.map +1 -1
- package/dist/coordination/leases/KubernetesLease.js +57 -36
- package/dist/coordination/leases/KubernetesLease.js.map +1 -1
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts +63 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.d.ts.map +1 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js +53 -0
- package/dist/coordination/leases/KubernetesLeaseOptions.js.map +1 -0
- package/dist/coordination/leases/k8sApi.d.ts +1 -1
- package/dist/coordination/leases/k8sApi.js +1 -1
- package/dist/crdt/DistributedData.d.ts +14 -34
- package/dist/crdt/DistributedData.d.ts.map +1 -1
- package/dist/crdt/DistributedData.js +37 -34
- package/dist/crdt/DistributedData.js.map +1 -1
- package/dist/crdt/DistributedDataOptions.d.ts +56 -0
- package/dist/crdt/DistributedDataOptions.d.ts.map +1 -0
- package/dist/crdt/DistributedDataOptions.js +38 -0
- package/dist/crdt/DistributedDataOptions.js.map +1 -0
- package/dist/crdt/GCounter.js +4 -4
- package/dist/crdt/GCounter.js.map +1 -1
- package/dist/crdt/GCounterMap.js +7 -7
- package/dist/crdt/GCounterMap.js.map +1 -1
- package/dist/crdt/GSet.js +8 -8
- package/dist/crdt/GSet.js.map +1 -1
- package/dist/crdt/LWWMap.d.ts +1 -1
- package/dist/crdt/LWWMap.js +19 -19
- package/dist/crdt/LWWMap.js.map +1 -1
- package/dist/crdt/MVRegister.js +16 -16
- package/dist/crdt/MVRegister.js.map +1 -1
- package/dist/crdt/ORMap.d.ts +2 -2
- package/dist/crdt/ORMap.js +18 -18
- package/dist/crdt/ORMap.js.map +1 -1
- package/dist/crdt/ORSet.js +38 -38
- package/dist/crdt/ORSet.js.map +1 -1
- 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/ConsumerController.d.ts +4 -11
- package/dist/delivery/ConsumerController.d.ts.map +1 -1
- package/dist/delivery/ConsumerController.js +12 -12
- package/dist/delivery/ConsumerController.js.map +1 -1
- package/dist/delivery/ConsumerControllerOptions.d.ts +32 -0
- package/dist/delivery/ConsumerControllerOptions.d.ts.map +1 -0
- package/dist/delivery/ConsumerControllerOptions.js +21 -0
- package/dist/delivery/ConsumerControllerOptions.js.map +1 -0
- package/dist/delivery/Messages.d.ts +2 -2
- package/dist/delivery/Messages.d.ts.map +1 -1
- package/dist/delivery/ProducerController.d.ts +8 -23
- package/dist/delivery/ProducerController.d.ts.map +1 -1
- package/dist/delivery/ProducerController.js +30 -27
- package/dist/delivery/ProducerController.js.map +1 -1
- package/dist/delivery/ProducerControllerOptions.d.ts +56 -0
- package/dist/delivery/ProducerControllerOptions.d.ts.map +1 -0
- package/dist/delivery/ProducerControllerOptions.js +47 -0
- package/dist/delivery/ProducerControllerOptions.js.map +1 -0
- package/dist/delivery/ReliableDelivery.d.ts +6 -5
- package/dist/delivery/ReliableDelivery.d.ts.map +1 -1
- package/dist/delivery/ReliableDelivery.js +6 -6
- package/dist/delivery/ReliableDelivery.js.map +1 -1
- package/dist/delivery/index.d.ts +6 -3
- package/dist/delivery/index.d.ts.map +1 -1
- package/dist/delivery/index.js +2 -0
- package/dist/delivery/index.js.map +1 -1
- package/dist/discovery/AutoDiscoveryOptions.d.ts +78 -0
- package/dist/discovery/AutoDiscoveryOptions.d.ts.map +1 -0
- package/dist/discovery/AutoDiscoveryOptions.js +45 -0
- package/dist/discovery/AutoDiscoveryOptions.js.map +1 -0
- package/dist/discovery/ConfigSeedProvider.d.ts +3 -8
- package/dist/discovery/ConfigSeedProvider.d.ts.map +1 -1
- package/dist/discovery/ConfigSeedProvider.js +8 -6
- package/dist/discovery/ConfigSeedProvider.js.map +1 -1
- package/dist/discovery/ConfigSeedProviderOptions.d.ts +40 -0
- package/dist/discovery/ConfigSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/ConfigSeedProviderOptions.js +38 -0
- package/dist/discovery/ConfigSeedProviderOptions.js.map +1 -0
- package/dist/discovery/DnsSeedProvider.d.ts +4 -28
- package/dist/discovery/DnsSeedProvider.d.ts.map +1 -1
- package/dist/discovery/DnsSeedProvider.js +14 -15
- package/dist/discovery/DnsSeedProvider.js.map +1 -1
- package/dist/discovery/DnsSeedProviderOptions.d.ts +77 -0
- package/dist/discovery/DnsSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/DnsSeedProviderOptions.js +68 -0
- package/dist/discovery/DnsSeedProviderOptions.js.map +1 -0
- package/dist/discovery/KubernetesApiSeedProvider.d.ts +3 -14
- package/dist/discovery/KubernetesApiSeedProvider.d.ts.map +1 -1
- package/dist/discovery/KubernetesApiSeedProvider.js +9 -7
- package/dist/discovery/KubernetesApiSeedProvider.js.map +1 -1
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts +52 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts.map +1 -0
- package/dist/discovery/KubernetesApiSeedProviderOptions.js +52 -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 +19 -10
- package/dist/discovery/Receptionist.js.map +1 -1
- package/dist/discovery/ReceptionistMessages.d.ts +2 -2
- package/dist/discovery/ReceptionistMessages.d.ts.map +1 -1
- package/dist/discovery/ReceptionistMessages.js +1 -1
- package/dist/discovery/ReceptionistMessages.js.map +1 -1
- package/dist/discovery/ReceptionistOptions.d.ts +36 -0
- package/dist/discovery/ReceptionistOptions.d.ts.map +1 -0
- package/dist/discovery/ReceptionistOptions.js +34 -0
- package/dist/discovery/ReceptionistOptions.js.map +1 -0
- package/dist/discovery/ServiceKey.d.ts +2 -2
- package/dist/discovery/ServiceKey.d.ts.map +1 -1
- package/dist/discovery/ServiceKey.js.map +1 -1
- package/dist/discovery/autoDiscovery.d.ts +3 -44
- package/dist/discovery/autoDiscovery.d.ts.map +1 -1
- package/dist/discovery/autoDiscovery.js +37 -35
- package/dist/discovery/autoDiscovery.js.map +1 -1
- package/dist/discovery/index.d.ts +11 -6
- 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/fsm/FSM.d.ts +1 -1
- package/dist/fsm/FSM.js +1 -1
- package/dist/http/Html.d.ts +53 -0
- package/dist/http/Html.d.ts.map +1 -0
- package/dist/http/Html.js +92 -0
- package/dist/http/Html.js.map +1 -0
- package/dist/http/HttpExtension.d.ts +9 -0
- package/dist/http/HttpExtension.d.ts.map +1 -1
- package/dist/http/HttpExtension.js +106 -10
- package/dist/http/HttpExtension.js.map +1 -1
- package/dist/http/Marshalling.js +3 -3
- package/dist/http/Marshalling.js.map +1 -1
- package/dist/http/MimeTypes.d.ts +15 -0
- package/dist/http/MimeTypes.d.ts.map +1 -0
- package/dist/http/MimeTypes.js +87 -0
- package/dist/http/MimeTypes.js.map +1 -0
- package/dist/http/Route.d.ts +153 -4
- package/dist/http/Route.d.ts.map +1 -1
- package/dist/http/Route.js +170 -9
- package/dist/http/Route.js.map +1 -1
- package/dist/http/backend/ExpressBackend.d.ts +31 -20
- package/dist/http/backend/ExpressBackend.d.ts.map +1 -1
- package/dist/http/backend/ExpressBackend.js +199 -34
- package/dist/http/backend/ExpressBackend.js.map +1 -1
- package/dist/http/backend/ExpressBackendOptions.d.ts +53 -0
- package/dist/http/backend/ExpressBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/ExpressBackendOptions.js +45 -0
- package/dist/http/backend/ExpressBackendOptions.js.map +1 -0
- package/dist/http/backend/FastifyBackend.d.ts +13 -1
- package/dist/http/backend/FastifyBackend.d.ts.map +1 -1
- package/dist/http/backend/FastifyBackend.js +124 -14
- package/dist/http/backend/FastifyBackend.js.map +1 -1
- package/dist/http/backend/HonoBackend.d.ts +39 -16
- package/dist/http/backend/HonoBackend.d.ts.map +1 -1
- package/dist/http/backend/HonoBackend.js +269 -35
- package/dist/http/backend/HonoBackend.js.map +1 -1
- package/dist/http/backend/HonoBackendOptions.d.ts +53 -0
- package/dist/http/backend/HonoBackendOptions.d.ts.map +1 -0
- package/dist/http/backend/HonoBackendOptions.js +45 -0
- package/dist/http/backend/HonoBackendOptions.js.map +1 -0
- package/dist/http/backend/HttpServerBackend.d.ts +36 -2
- package/dist/http/backend/HttpServerBackend.d.ts.map +1 -1
- package/dist/http/cache/IdempotencyKey.d.ts +2 -46
- package/dist/http/cache/IdempotencyKey.d.ts.map +1 -1
- package/dist/http/cache/IdempotencyKey.js +25 -20
- package/dist/http/cache/IdempotencyKey.js.map +1 -1
- package/dist/http/cache/IdempotencyOptions.d.ts +84 -0
- package/dist/http/cache/IdempotencyOptions.d.ts.map +1 -0
- package/dist/http/cache/IdempotencyOptions.js +61 -0
- package/dist/http/cache/IdempotencyOptions.js.map +1 -0
- package/dist/http/cache/RateLimit.d.ts +13 -32
- package/dist/http/cache/RateLimit.d.ts.map +1 -1
- package/dist/http/cache/RateLimit.js +42 -8
- package/dist/http/cache/RateLimit.js.map +1 -1
- package/dist/http/cache/RateLimitOptions.d.ts +80 -0
- package/dist/http/cache/RateLimitOptions.d.ts.map +1 -0
- package/dist/http/cache/RateLimitOptions.js +61 -0
- package/dist/http/cache/RateLimitOptions.js.map +1 -0
- package/dist/http/cache/ResponseCache.js +3 -3
- package/dist/http/cache/ResponseCache.js.map +1 -1
- package/dist/http/cache/index.d.ts +4 -2
- package/dist/http/cache/index.d.ts.map +1 -1
- package/dist/http/cache/index.js +2 -0
- package/dist/http/cache/index.js.map +1 -1
- package/dist/http/cookies.d.ts +38 -0
- package/dist/http/cookies.d.ts.map +1 -0
- package/dist/http/cookies.js +102 -0
- package/dist/http/cookies.js.map +1 -0
- package/dist/http/index.d.ts +19 -7
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +17 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/middleware/BasicAuth.d.ts +5 -0
- package/dist/http/middleware/BasicAuth.d.ts.map +1 -0
- package/dist/http/middleware/BasicAuth.js +58 -0
- package/dist/http/middleware/BasicAuth.js.map +1 -0
- package/dist/http/middleware/BasicAuthOptions.d.ts +22 -0
- package/dist/http/middleware/BasicAuthOptions.d.ts.map +1 -0
- package/dist/http/middleware/BasicAuthOptions.js +19 -0
- package/dist/http/middleware/BasicAuthOptions.js.map +1 -0
- 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/Cors.d.ts +39 -0
- package/dist/http/middleware/Cors.d.ts.map +1 -0
- package/dist/http/middleware/Cors.js +164 -0
- package/dist/http/middleware/Cors.js.map +1 -0
- package/dist/http/middleware/CorsOptions.d.ts +57 -0
- package/dist/http/middleware/CorsOptions.d.ts.map +1 -0
- package/dist/http/middleware/CorsOptions.js +62 -0
- package/dist/http/middleware/CorsOptions.js.map +1 -0
- package/dist/http/middleware/Csp.d.ts +13 -0
- package/dist/http/middleware/Csp.d.ts.map +1 -0
- package/dist/http/middleware/Csp.js +68 -0
- package/dist/http/middleware/Csp.js.map +1 -0
- package/dist/http/middleware/CspOptions.d.ts +53 -0
- package/dist/http/middleware/CspOptions.d.ts.map +1 -0
- package/dist/http/middleware/CspOptions.js +24 -0
- package/dist/http/middleware/CspOptions.js.map +1 -0
- package/dist/http/middleware/Csrf.d.ts +22 -0
- package/dist/http/middleware/Csrf.d.ts.map +1 -0
- package/dist/http/middleware/Csrf.js +165 -0
- package/dist/http/middleware/Csrf.js.map +1 -0
- package/dist/http/middleware/CsrfOptions.d.ts +75 -0
- package/dist/http/middleware/CsrfOptions.d.ts.map +1 -0
- package/dist/http/middleware/CsrfOptions.js +80 -0
- package/dist/http/middleware/CsrfOptions.js.map +1 -0
- package/dist/http/middleware/Hsts.d.ts +28 -0
- package/dist/http/middleware/Hsts.d.ts.map +1 -0
- package/dist/http/middleware/Hsts.js +34 -0
- package/dist/http/middleware/Hsts.js.map +1 -0
- package/dist/http/middleware/HstsOptions.d.ts +44 -0
- package/dist/http/middleware/HstsOptions.d.ts.map +1 -0
- package/dist/http/middleware/HstsOptions.js +49 -0
- package/dist/http/middleware/HstsOptions.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/RequestId.d.ts +5 -0
- package/dist/http/middleware/RequestId.d.ts.map +1 -0
- package/dist/http/middleware/RequestId.js +24 -0
- package/dist/http/middleware/RequestId.js.map +1 -0
- package/dist/http/middleware/RequestIdOptions.d.ts +22 -0
- package/dist/http/middleware/RequestIdOptions.d.ts.map +1 -0
- package/dist/http/middleware/RequestIdOptions.js +19 -0
- package/dist/http/middleware/RequestIdOptions.js.map +1 -0
- package/dist/http/middleware/SecurityHeaders.d.ts +11 -0
- package/dist/http/middleware/SecurityHeaders.d.ts.map +1 -0
- package/dist/http/middleware/SecurityHeaders.js +50 -0
- package/dist/http/middleware/SecurityHeaders.js.map +1 -0
- package/dist/http/middleware/SecurityHeadersOptions.d.ts +44 -0
- package/dist/http/middleware/SecurityHeadersOptions.d.ts.map +1 -0
- package/dist/http/middleware/SecurityHeadersOptions.js +40 -0
- package/dist/http/middleware/SecurityHeadersOptions.js.map +1 -0
- package/dist/http/middleware/Timeout.d.ts +13 -0
- package/dist/http/middleware/Timeout.d.ts.map +1 -0
- package/dist/http/middleware/Timeout.js +29 -0
- package/dist/http/middleware/Timeout.js.map +1 -0
- package/dist/http/middleware/TimeoutOptions.d.ts +30 -0
- package/dist/http/middleware/TimeoutOptions.d.ts.map +1 -0
- package/dist/http/middleware/TimeoutOptions.js +30 -0
- package/dist/http/middleware/TimeoutOptions.js.map +1 -0
- package/dist/http/middleware/headers.d.ts +21 -0
- package/dist/http/middleware/headers.d.ts.map +1 -0
- package/dist/http/middleware/headers.js +43 -0
- package/dist/http/middleware/headers.js.map +1 -0
- package/dist/http/middleware/index.d.ts +30 -0
- package/dist/http/middleware/index.d.ts.map +1 -0
- package/dist/http/middleware/index.js +23 -0
- package/dist/http/middleware/index.js.map +1 -0
- package/dist/http/static/DirectoryListing.d.ts +16 -0
- package/dist/http/static/DirectoryListing.d.ts.map +1 -0
- package/dist/http/static/DirectoryListing.js +39 -0
- package/dist/http/static/DirectoryListing.js.map +1 -0
- package/dist/http/static/StaticFiles.d.ts +11 -0
- package/dist/http/static/StaticFiles.d.ts.map +1 -0
- package/dist/http/static/StaticFiles.js +202 -0
- package/dist/http/static/StaticFiles.js.map +1 -0
- package/dist/http/static/StaticFilesOptions.d.ts +76 -0
- package/dist/http/static/StaticFilesOptions.d.ts.map +1 -0
- package/dist/http/static/StaticFilesOptions.js +83 -0
- package/dist/http/static/StaticFilesOptions.js.map +1 -0
- package/dist/http/static/fsAccess.d.ts +25 -0
- package/dist/http/static/fsAccess.d.ts.map +1 -0
- package/dist/http/static/fsAccess.js +42 -0
- package/dist/http/static/fsAccess.js.map +1 -0
- package/dist/http/static/index.d.ts +7 -0
- package/dist/http/static/index.d.ts.map +1 -0
- package/dist/http/static/index.js +5 -0
- package/dist/http/static/index.js.map +1 -0
- package/dist/http/static/staticPath.d.ts +14 -0
- package/dist/http/static/staticPath.d.ts.map +1 -0
- package/dist/http/static/staticPath.js +67 -0
- package/dist/http/static/staticPath.js.map +1 -0
- package/dist/http/types.d.ts +33 -3
- package/dist/http/types.d.ts.map +1 -1
- package/dist/http/types.js +11 -1
- package/dist/http/types.js.map +1 -1
- package/dist/http/websocket/ConnectionWiring.d.ts +59 -0
- package/dist/http/websocket/ConnectionWiring.d.ts.map +1 -0
- package/dist/http/websocket/ConnectionWiring.js +165 -0
- package/dist/http/websocket/ConnectionWiring.js.map +1 -0
- package/dist/http/websocket/SocketAdapter.d.ts +72 -0
- package/dist/http/websocket/SocketAdapter.d.ts.map +1 -0
- package/dist/http/websocket/SocketAdapter.js +97 -0
- package/dist/http/websocket/SocketAdapter.js.map +1 -0
- package/dist/http/websocket/WebsocketClientActor.d.ts +68 -0
- package/dist/http/websocket/WebsocketClientActor.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketClientActor.js +195 -0
- package/dist/http/websocket/WebsocketClientActor.js.map +1 -0
- package/dist/http/websocket/WebsocketClientOptions.d.ts +82 -0
- package/dist/http/websocket/WebsocketClientOptions.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketClientOptions.js +82 -0
- package/dist/http/websocket/WebsocketClientOptions.js.map +1 -0
- package/dist/http/websocket/WebsocketCodec.d.ts +65 -0
- package/dist/http/websocket/WebsocketCodec.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketCodec.js +82 -0
- package/dist/http/websocket/WebsocketCodec.js.map +1 -0
- package/dist/http/websocket/WebsocketConnection.d.ts +59 -0
- package/dist/http/websocket/WebsocketConnection.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketConnection.js +45 -0
- package/dist/http/websocket/WebsocketConnection.js.map +1 -0
- package/dist/http/websocket/WebsocketConnectionActor.d.ts +51 -0
- package/dist/http/websocket/WebsocketConnectionActor.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketConnectionActor.js +170 -0
- package/dist/http/websocket/WebsocketConnectionActor.js.map +1 -0
- package/dist/http/websocket/WebsocketMessages.d.ts +115 -0
- package/dist/http/websocket/WebsocketMessages.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketMessages.js +41 -0
- package/dist/http/websocket/WebsocketMessages.js.map +1 -0
- package/dist/http/websocket/WebsocketPolicy.d.ts +51 -0
- package/dist/http/websocket/WebsocketPolicy.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketPolicy.js +70 -0
- package/dist/http/websocket/WebsocketPolicy.js.map +1 -0
- package/dist/http/websocket/WebsocketRoute.d.ts +20 -0
- package/dist/http/websocket/WebsocketRoute.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketRoute.js +72 -0
- package/dist/http/websocket/WebsocketRoute.js.map +1 -0
- package/dist/http/websocket/WebsocketRouteOptions.d.ts +91 -0
- package/dist/http/websocket/WebsocketRouteOptions.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketRouteOptions.js +92 -0
- package/dist/http/websocket/WebsocketRouteOptions.js.map +1 -0
- package/dist/http/websocket/WebsocketServerActor.d.ts +65 -0
- package/dist/http/websocket/WebsocketServerActor.d.ts.map +1 -0
- package/dist/http/websocket/WebsocketServerActor.js +141 -0
- package/dist/http/websocket/WebsocketServerActor.js.map +1 -0
- package/dist/http/websocket/index.d.ts +22 -0
- package/dist/http/websocket/index.d.ts.map +1 -0
- package/dist/http/websocket/index.js +15 -0
- package/dist/http/websocket/index.js.map +1 -0
- package/dist/http/websocket/matchPattern.d.ts +12 -0
- package/dist/http/websocket/matchPattern.d.ts.map +1 -0
- package/dist/http/websocket/matchPattern.js +43 -0
- package/dist/http/websocket/matchPattern.js.map +1 -0
- package/dist/http/websocket/rawResponse.d.ts +15 -0
- package/dist/http/websocket/rawResponse.d.ts.map +1 -0
- package/dist/http/websocket/rawResponse.js +64 -0
- package/dist/http/websocket/rawResponse.js.map +1 -0
- package/dist/http/websocket/types.d.ts +70 -0
- package/dist/http/websocket/types.d.ts.map +1 -0
- package/dist/http/websocket/types.js +81 -0
- package/dist/http/websocket/types.js.map +1 -0
- package/dist/http/websocket/websocketConstructor.d.ts +34 -0
- package/dist/http/websocket/websocketConstructor.d.ts.map +1 -0
- package/dist/http/websocket/websocketConstructor.js +38 -0
- package/dist/http/websocket/websocketConstructor.js.map +1 -0
- package/dist/index.d.ts +31 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/ActorCell.d.ts +24 -9
- package/dist/internal/ActorCell.d.ts.map +1 -1
- package/dist/internal/ActorCell.js +66 -36
- package/dist/internal/ActorCell.js.map +1 -1
- package/dist/internal/LocalActorRef.d.ts +4 -4
- package/dist/internal/LocalActorRef.d.ts.map +1 -1
- package/dist/internal/LocalActorRef.js.map +1 -1
- package/dist/io/broker/AmqpActor.d.ts +26 -21
- package/dist/io/broker/AmqpActor.d.ts.map +1 -1
- package/dist/io/broker/AmqpActor.js +41 -31
- package/dist/io/broker/AmqpActor.js.map +1 -1
- package/dist/io/broker/AmqpOptions.d.ts +46 -0
- package/dist/io/broker/AmqpOptions.d.ts.map +1 -0
- package/dist/io/broker/AmqpOptions.js +45 -0
- package/dist/io/broker/AmqpOptions.js.map +1 -0
- package/dist/io/broker/BrokerActor.d.ts +34 -24
- package/dist/io/broker/BrokerActor.d.ts.map +1 -1
- package/dist/io/broker/BrokerActor.js +51 -36
- package/dist/io/broker/BrokerActor.js.map +1 -1
- package/dist/io/broker/BrokerOptions.d.ts +125 -0
- package/dist/io/broker/BrokerOptions.d.ts.map +1 -0
- package/dist/io/broker/BrokerOptions.js +151 -0
- package/dist/io/broker/BrokerOptions.js.map +1 -0
- package/dist/io/broker/GrpcClientActor.d.ts +13 -24
- package/dist/io/broker/GrpcClientActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcClientActor.js +42 -40
- package/dist/io/broker/GrpcClientActor.js.map +1 -1
- package/dist/io/broker/GrpcClientOptions.d.ts +53 -0
- package/dist/io/broker/GrpcClientOptions.d.ts.map +1 -0
- package/dist/io/broker/GrpcClientOptions.js +52 -0
- package/dist/io/broker/GrpcClientOptions.js.map +1 -0
- package/dist/io/broker/GrpcServerActor.d.ts +6 -27
- package/dist/io/broker/GrpcServerActor.d.ts.map +1 -1
- package/dist/io/broker/GrpcServerActor.js +30 -30
- 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 +27 -47
- package/dist/io/broker/JetStreamActor.d.ts.map +1 -1
- package/dist/io/broker/JetStreamActor.js +93 -91
- package/dist/io/broker/JetStreamActor.js.map +1 -1
- package/dist/io/broker/JetStreamOptions.d.ts +69 -0
- package/dist/io/broker/JetStreamOptions.d.ts.map +1 -0
- package/dist/io/broker/JetStreamOptions.js +65 -0
- package/dist/io/broker/JetStreamOptions.js.map +1 -0
- package/dist/io/broker/KafkaActor.d.ts +24 -63
- package/dist/io/broker/KafkaActor.d.ts.map +1 -1
- package/dist/io/broker/KafkaActor.js +76 -62
- package/dist/io/broker/KafkaActor.js.map +1 -1
- package/dist/io/broker/KafkaOptions.d.ts +87 -0
- package/dist/io/broker/KafkaOptions.d.ts.map +1 -0
- package/dist/io/broker/KafkaOptions.js +61 -0
- package/dist/io/broker/KafkaOptions.js.map +1 -0
- package/dist/io/broker/MqttActor.d.ts +178 -116
- package/dist/io/broker/MqttActor.d.ts.map +1 -1
- package/dist/io/broker/MqttActor.js +373 -147
- 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 +149 -0
- package/dist/io/broker/MqttMessages.d.ts.map +1 -0
- package/dist/io/broker/MqttMessages.js +86 -0
- package/dist/io/broker/MqttMessages.js.map +1 -0
- package/dist/io/broker/MqttOptions.d.ts +109 -0
- package/dist/io/broker/MqttOptions.d.ts.map +1 -0
- package/dist/io/broker/MqttOptions.js +90 -0
- package/dist/io/broker/MqttOptions.js.map +1 -0
- package/dist/io/broker/NatsActor.d.ts +12 -25
- package/dist/io/broker/NatsActor.d.ts.map +1 -1
- package/dist/io/broker/NatsActor.js +36 -34
- package/dist/io/broker/NatsActor.js.map +1 -1
- package/dist/io/broker/NatsOptions.d.ts +56 -0
- package/dist/io/broker/NatsOptions.d.ts.map +1 -0
- package/dist/io/broker/NatsOptions.js +52 -0
- package/dist/io/broker/NatsOptions.js.map +1 -0
- package/dist/io/broker/RedisStreamsActor.d.ts +12 -28
- package/dist/io/broker/RedisStreamsActor.d.ts.map +1 -1
- package/dist/io/broker/RedisStreamsActor.js +40 -38
- package/dist/io/broker/RedisStreamsActor.js.map +1 -1
- package/dist/io/broker/RedisStreamsOptions.d.ts +56 -0
- package/dist/io/broker/RedisStreamsOptions.d.ts.map +1 -0
- package/dist/io/broker/RedisStreamsOptions.js +49 -0
- package/dist/io/broker/RedisStreamsOptions.js.map +1 -0
- package/dist/io/broker/SseActor.d.ts +12 -19
- package/dist/io/broker/SseActor.d.ts.map +1 -1
- package/dist/io/broker/SseActor.js +43 -22
- package/dist/io/broker/SseActor.js.map +1 -1
- package/dist/io/broker/SseOptions.d.ts +43 -0
- package/dist/io/broker/SseOptions.d.ts.map +1 -0
- package/dist/io/broker/SseOptions.js +40 -0
- package/dist/io/broker/SseOptions.js.map +1 -0
- package/dist/io/broker/TcpSocketActor.d.ts +12 -25
- package/dist/io/broker/TcpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/TcpSocketActor.js +35 -24
- package/dist/io/broker/TcpSocketActor.js.map +1 -1
- package/dist/io/broker/TcpSocketOptions.d.ts +51 -0
- package/dist/io/broker/TcpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/TcpSocketOptions.js +45 -0
- package/dist/io/broker/TcpSocketOptions.js.map +1 -0
- package/dist/io/broker/UdpSocketActor.d.ts +12 -21
- package/dist/io/broker/UdpSocketActor.d.ts.map +1 -1
- package/dist/io/broker/UdpSocketActor.js +18 -16
- package/dist/io/broker/UdpSocketActor.js.map +1 -1
- package/dist/io/broker/UdpSocketOptions.d.ts +47 -0
- package/dist/io/broker/UdpSocketOptions.d.ts.map +1 -0
- package/dist/io/broker/UdpSocketOptions.js +49 -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 +22 -5
- package/dist/io/broker/index.js.map +1 -1
- package/dist/mailbox/BoundedMailbox.d.ts +3 -5
- package/dist/mailbox/BoundedMailbox.d.ts.map +1 -1
- package/dist/mailbox/BoundedMailbox.js +11 -4
- package/dist/mailbox/BoundedMailbox.js.map +1 -1
- package/dist/mailbox/BoundedMailboxOptions.d.ts +49 -0
- package/dist/mailbox/BoundedMailboxOptions.d.ts.map +1 -0
- package/dist/mailbox/BoundedMailboxOptions.js +46 -0
- package/dist/mailbox/BoundedMailboxOptions.js.map +1 -0
- package/dist/mailbox/PriorityMailbox.d.ts +2 -4
- package/dist/mailbox/PriorityMailbox.d.ts.map +1 -1
- package/dist/mailbox/PriorityMailbox.js +4 -4
- package/dist/mailbox/PriorityMailbox.js.map +1 -1
- package/dist/mailbox/PriorityMailboxOptions.d.ts +27 -0
- package/dist/mailbox/PriorityMailboxOptions.d.ts.map +1 -0
- package/dist/mailbox/PriorityMailboxOptions.js +20 -0
- package/dist/mailbox/PriorityMailboxOptions.js.map +1 -0
- package/dist/mailbox/index.d.ts +6 -2
- package/dist/mailbox/index.d.ts.map +1 -1
- package/dist/mailbox/index.js +2 -0
- package/dist/mailbox/index.js.map +1 -1
- package/dist/management/HttpManagement.d.ts +2 -18
- package/dist/management/HttpManagement.d.ts.map +1 -1
- package/dist/management/HttpManagement.js +38 -11
- package/dist/management/HttpManagement.js.map +1 -1
- package/dist/management/ManagementRoutesOptions.d.ts +43 -0
- package/dist/management/ManagementRoutesOptions.d.ts.map +1 -0
- package/dist/management/ManagementRoutesOptions.js +35 -0
- package/dist/management/ManagementRoutesOptions.js.map +1 -0
- package/dist/management/index.d.ts +2 -1
- package/dist/management/index.d.ts.map +1 -1
- package/dist/management/index.js +1 -0
- package/dist/management/index.js.map +1 -1
- package/dist/metrics/Metrics.js +11 -11
- package/dist/metrics/Metrics.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/PrometheusExporter.js +23 -23
- package/dist/metrics/PrometheusExporter.js.map +1 -1
- 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/pattern/BackoffPolicy.js +5 -5
- package/dist/pattern/BackoffPolicy.js.map +1 -1
- package/dist/pattern/CircuitBreaker.d.ts +3 -12
- package/dist/pattern/CircuitBreaker.d.ts.map +1 -1
- package/dist/pattern/CircuitBreaker.js +13 -16
- package/dist/pattern/CircuitBreaker.js.map +1 -1
- package/dist/pattern/CircuitBreakerOptions.d.ts +50 -0
- package/dist/pattern/CircuitBreakerOptions.d.ts.map +1 -0
- package/dist/pattern/CircuitBreakerOptions.js +53 -0
- package/dist/pattern/CircuitBreakerOptions.js.map +1 -0
- package/dist/pattern/index.d.ts +3 -1
- package/dist/pattern/index.d.ts.map +1 -1
- package/dist/pattern/index.js +1 -0
- package/dist/pattern/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 +9 -9
- 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/EventDispatcher.js +3 -3
- package/dist/persistence/EventDispatcher.js.map +1 -1
- package/dist/persistence/JournalEventBus.js +2 -2
- package/dist/persistence/JournalEventBus.js.map +1 -1
- package/dist/persistence/PersistenceOptions.d.ts +46 -1
- package/dist/persistence/PersistenceOptions.d.ts.map +1 -1
- package/dist/persistence/PersistenceOptions.js +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.d.ts +2 -2
- package/dist/persistence/ReplicatedEventSourcedActor.d.ts.map +1 -1
- package/dist/persistence/ReplicatedEventSourcedActor.js +4 -4
- 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 +5 -9
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js +52 -8
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js.map +1 -1
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts +83 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts.map +1 -0
- package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js +67 -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/CassandraClient.d.ts +1 -1
- package/dist/persistence/journals/CassandraClient.d.ts.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 +16 -7
- package/dist/persistence/journals/CassandraJournal.js.map +1 -1
- package/dist/persistence/journals/CassandraJournalOptions.d.ts +113 -0
- package/dist/persistence/journals/CassandraJournalOptions.d.ts.map +1 -0
- package/dist/persistence/journals/CassandraJournalOptions.js +101 -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 +4 -18
- package/dist/persistence/journals/SqliteJournal.d.ts.map +1 -1
- package/dist/persistence/journals/SqliteJournal.js +13 -8
- 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/migration/MigrationChain.js +3 -3
- package/dist/persistence/migration/MigrationChain.js.map +1 -1
- package/dist/persistence/migration/SchemaRegistry.js +9 -9
- package/dist/persistence/migration/SchemaRegistry.js.map +1 -1
- package/dist/persistence/migration/defaultsAdapter.js +10 -10
- package/dist/persistence/migration/defaultsAdapter.js.map +1 -1
- package/dist/persistence/migration/validatedAdapter.js +4 -4
- package/dist/persistence/migration/validatedAdapter.js.map +1 -1
- package/dist/persistence/migration/wrapLegacy.js +2 -2
- package/dist/persistence/migration/wrapLegacy.js.map +1 -1
- package/dist/persistence/object-storage/BodyCodec.d.ts +57 -0
- package/dist/persistence/object-storage/BodyCodec.d.ts.map +1 -1
- package/dist/persistence/object-storage/BodyCodec.js +88 -22
- package/dist/persistence/object-storage/BodyCodec.js.map +1 -1
- package/dist/persistence/object-storage/Compression.d.ts +28 -8
- package/dist/persistence/object-storage/Compression.d.ts.map +1 -1
- package/dist/persistence/object-storage/Compression.js +107 -32
- package/dist/persistence/object-storage/Compression.js.map +1 -1
- package/dist/persistence/object-storage/Encryption.js +3 -3
- package/dist/persistence/object-storage/Encryption.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 +61 -16
- package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts +51 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js +44 -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 +8 -24
- package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePlugin.js +39 -29
- package/dist/persistence/object-storage/ObjectStoragePlugin.js.map +1 -1
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts +72 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/ObjectStoragePluginOptions.js +59 -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 +24 -21
- package/dist/persistence/object-storage/S3ObjectStorageBackend.js.map +1 -1
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts +70 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts.map +1 -0
- package/dist/persistence/object-storage/S3ObjectStorageOptions.js +58 -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 +45 -11
- 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/query/CassandraQuery.js +11 -11
- package/dist/persistence/query/CassandraQuery.js.map +1 -1
- package/dist/persistence/query/InMemoryQuery.js +12 -12
- package/dist/persistence/query/InMemoryQuery.js.map +1 -1
- package/dist/persistence/query/PersistenceQuery.js +6 -6
- package/dist/persistence/query/PersistenceQuery.js.map +1 -1
- package/dist/persistence/query/SqliteQuery.js +6 -6
- package/dist/persistence/query/SqliteQuery.js.map +1 -1
- package/dist/persistence/replicated/VectorClock.js +13 -13
- package/dist/persistence/replicated/VectorClock.js.map +1 -1
- 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 -9
- package/dist/persistence/snapshot-stores/CachedSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts +47 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js +47 -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 +3 -15
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js +28 -17
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js.map +1 -1
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts +67 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts.map +1 -0
- package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js +63 -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 +1 -14
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts.map +1 -1
- package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js +6 -3
- 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/persistence/storage/KeyValidator.js +3 -3
- package/dist/persistence/storage/KeyValidator.js.map +1 -1
- package/dist/persistence/storage/SqlIdentifier.d.ts +11 -0
- package/dist/persistence/storage/SqlIdentifier.d.ts.map +1 -0
- package/dist/persistence/storage/SqlIdentifier.js +16 -0
- package/dist/persistence/storage/SqlIdentifier.js.map +1 -0
- package/dist/runtime/detect.d.ts.map +1 -1
- package/dist/runtime/detect.js +7 -7
- package/dist/runtime/detect.js.map +1 -1
- 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 +24 -2
- 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/runtime/sqlite/BetterSqliteDriver.js.map +1 -1
- package/dist/runtime/sqlite/BunSqliteDriver.js.map +1 -1
- package/dist/runtime/tcp/BunTcpBackend.d.ts +3 -3
- package/dist/runtime/tcp/BunTcpBackend.d.ts.map +1 -1
- package/dist/runtime/tcp/DenoTcpBackend.d.ts +3 -3
- package/dist/runtime/tcp/DenoTcpBackend.d.ts.map +1 -1
- package/dist/runtime/tcp/DenoTcpBackend.js +3 -3
- package/dist/runtime/tcp/DenoTcpBackend.js.map +1 -1
- package/dist/runtime/tcp/NodeTcpBackend.d.ts +3 -3
- package/dist/runtime/tcp/NodeTcpBackend.d.ts.map +1 -1
- package/dist/runtime/tcp/TcpBackend.d.ts +3 -3
- package/dist/runtime/tcp/TcpBackend.d.ts.map +1 -1
- package/dist/runtime/tcp/index.d.ts +1 -1
- package/dist/runtime/tcp/index.d.ts.map +1 -1
- package/dist/runtime/worker/NodeWorkerBackend.js.map +1 -1
- package/dist/runtime/worker/WebWorkerBackend.js +3 -3
- package/dist/runtime/worker/WebWorkerBackend.js.map +1 -1
- package/dist/serialization/CborCodec.d.ts +2 -2
- package/dist/serialization/CborCodec.d.ts.map +1 -1
- package/dist/serialization/CborCodec.js +80 -80
- package/dist/serialization/CborCodec.js.map +1 -1
- package/dist/serialization/JsonSerializer.js +20 -7
- package/dist/serialization/JsonSerializer.js.map +1 -1
- package/dist/serialization/SerializationExtension.d.ts +2 -2
- package/dist/serialization/SerializationExtension.d.ts.map +1 -1
- package/dist/serialization/SerializationExtension.js +3 -3
- package/dist/serialization/SerializationExtension.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 +10 -9
- package/dist/testkit/ManualScheduler.js.map +1 -1
- package/dist/testkit/MockCluster.d.ts +67 -0
- package/dist/testkit/MockCluster.d.ts.map +1 -0
- package/dist/testkit/MockCluster.js +189 -0
- package/dist/testkit/MockCluster.js.map +1 -0
- package/dist/testkit/MockClusterOptions.d.ts +32 -0
- package/dist/testkit/MockClusterOptions.d.ts.map +1 -0
- package/dist/testkit/MockClusterOptions.js +23 -0
- package/dist/testkit/MockClusterOptions.js.map +1 -0
- package/dist/testkit/MultiNodeClusterFixture.d.ts +63 -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 -81
- package/dist/testkit/MultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/MultiNodeSpec.js +139 -44
- package/dist/testkit/MultiNodeSpec.js.map +1 -1
- package/dist/testkit/MultiNodeSpecOptions.d.ts +57 -0
- package/dist/testkit/MultiNodeSpecOptions.d.ts.map +1 -0
- package/dist/testkit/MultiNodeSpecOptions.js +43 -0
- package/dist/testkit/MultiNodeSpecOptions.js.map +1 -0
- package/dist/testkit/ParallelMultiNodeSpec.d.ts +13 -72
- package/dist/testkit/ParallelMultiNodeSpec.d.ts.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpec.js +82 -36
- package/dist/testkit/ParallelMultiNodeSpec.js.map +1 -1
- package/dist/testkit/ParallelMultiNodeSpecOptions.d.ts +58 -0
- package/dist/testkit/ParallelMultiNodeSpecOptions.d.ts.map +1 -0
- package/dist/testkit/ParallelMultiNodeSpecOptions.js +51 -0
- package/dist/testkit/ParallelMultiNodeSpecOptions.js.map +1 -0
- 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 +7 -9
- package/dist/testkit/TestKit.d.ts.map +1 -1
- package/dist/testkit/TestKit.js +11 -7
- 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 +5 -10
- package/dist/testkit/TestProbe.d.ts.map +1 -1
- package/dist/testkit/TestProbe.js +23 -20
- package/dist/testkit/TestProbe.js.map +1 -1
- package/dist/testkit/TestProbeOptions.d.ts +32 -0
- package/dist/testkit/TestProbeOptions.d.ts.map +1 -0
- package/dist/testkit/TestProbeOptions.js +29 -0
- package/dist/testkit/TestProbeOptions.js.map +1 -0
- package/dist/testkit/index.d.ts +15 -4
- package/dist/testkit/index.d.ts.map +1 -1
- package/dist/testkit/index.js +8 -0
- package/dist/testkit/index.js.map +1 -1
- package/dist/testkit/internal/MultiNodeBroker.js +3 -3
- package/dist/testkit/internal/MultiNodeBroker.js.map +1 -1
- package/dist/testkit/internal/MultiNodeTransport.js +2 -2
- package/dist/testkit/internal/MultiNodeTransport.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 +21 -17
- 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/Tracer.js +2 -2
- package/dist/tracing/Tracer.js.map +1 -1
- 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/typed/TypedActor.d.ts.map +1 -1
- package/dist/typed/TypedActor.js +6 -6
- package/dist/typed/TypedActor.js.map +1 -1
- package/dist/util/Constants.d.ts +24 -1
- package/dist/util/Constants.d.ts.map +1 -1
- package/dist/util/Constants.js +24 -1
- package/dist/util/Constants.js.map +1 -1
- package/dist/util/Either.js +4 -4
- package/dist/util/Either.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/util/OptionsValidator.d.ts +114 -0
- package/dist/util/OptionsValidator.d.ts.map +1 -0
- package/dist/util/OptionsValidator.js +204 -0
- package/dist/util/OptionsValidator.js.map +1 -0
- package/dist/util/Try.js +4 -4
- package/dist/util/Try.js.map +1 -1
- package/dist/worker/WorkerCluster.d.ts +3 -12
- package/dist/worker/WorkerCluster.d.ts.map +1 -1
- package/dist/worker/WorkerCluster.js +33 -30
- package/dist/worker/WorkerCluster.js.map +1 -1
- package/dist/worker/WorkerClusterOptions.d.ts +61 -0
- package/dist/worker/WorkerClusterOptions.d.ts.map +1 -0
- package/dist/worker/WorkerClusterOptions.js +70 -0
- package/dist/worker/WorkerClusterOptions.js.map +1 -0
- package/dist/worker/WorkerNode.js +5 -5
- package/dist/worker/WorkerNode.js.map +1 -1
- 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/BrokerSettings.d.ts +0 -72
- package/dist/io/broker/BrokerSettings.d.ts.map +0 -1
- package/dist/io/broker/BrokerSettings.js +0 -73
- package/dist/io/broker/BrokerSettings.js.map +0 -1
- 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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
2
|
+
import { OptionsValidator } from '../../util/OptionsValidator.js';
|
|
3
|
+
/** Plain options-object shape accepted by {@link KeepReferee}. */
|
|
4
|
+
export interface KeepRefereeOptionsType {
|
|
5
|
+
/**
|
|
6
|
+
* Fixed "referee" address; whichever partition contains it survives.
|
|
7
|
+
* Must match the address format returned by `NodeAddress.toString()`.
|
|
8
|
+
*/
|
|
9
|
+
readonly refereeAddress: string;
|
|
10
|
+
/** Additional quorum a.k.a. down-all-if-referee-reachable-but-too-few. */
|
|
11
|
+
readonly downAllIfBelowQuorum?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fluent builder for {@link KeepRefereeOptionsType}:
|
|
15
|
+
*
|
|
16
|
+
* new KeepReferee(
|
|
17
|
+
* KeepRefereeOptions.create().withRefereeAddress('sys@10.0.0.1:2551'),
|
|
18
|
+
* );
|
|
19
|
+
*/
|
|
20
|
+
export declare class KeepRefereeOptionsBuilder extends OptionsBuilder<KeepRefereeOptionsType> {
|
|
21
|
+
/** Start a fresh builder. */
|
|
22
|
+
static create(): KeepRefereeOptionsBuilder;
|
|
23
|
+
/** Fixed referee address; the partition containing it survives. */
|
|
24
|
+
withRefereeAddress(refereeAddress: string): this;
|
|
25
|
+
/** Down everyone if the referee side has fewer than this many members. */
|
|
26
|
+
withDownAllIfBelowQuorum(count: number): this;
|
|
27
|
+
}
|
|
28
|
+
/** Validates resolved {@link KeepRefereeOptionsType} settings. */
|
|
29
|
+
export declare class KeepRefereeOptionsValidator extends OptionsValidator<KeepRefereeOptionsType> {
|
|
30
|
+
constructor();
|
|
31
|
+
protected rules(s: Partial<KeepRefereeOptionsType>): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Accepted input for the {@link KeepReferee} constructor: the fluent
|
|
35
|
+
* {@link KeepRefereeOptionsBuilder} OR a plain {@link KeepRefereeOptionsType}
|
|
36
|
+
* object.
|
|
37
|
+
*/
|
|
38
|
+
export type KeepRefereeOptions = KeepRefereeOptionsBuilder | Partial<KeepRefereeOptionsType>;
|
|
39
|
+
/** Value alias so `KeepRefereeOptions.create()` / `new KeepRefereeOptions()` resolve to the builder. */
|
|
40
|
+
export declare const KeepRefereeOptions: typeof KeepRefereeOptionsBuilder;
|
|
41
|
+
//# sourceMappingURL=KeepRefereeOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeepRefereeOptions.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/KeepRefereeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC;AAED;;;;;;GAMG;AACH,qBAAa,yBAA0B,SAAQ,cAAc,CAAC,sBAAsB,CAAC;IACnF,6BAA6B;IAC7B,MAAM,CAAC,MAAM,IAAI,yBAAyB;IAI1C,mEAAmE;IACnE,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAIhD,0EAA0E;IAC1E,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAG9C;AAED,kEAAkE;AAClE,qBAAa,2BAA4B,SAAQ,gBAAgB,CAAC,sBAAsB,CAAC;;IAIvF,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI;CAK1D;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC7F,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,kCAA4B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
2
|
+
import { OptionsValidator } from '../../util/OptionsValidator.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fluent builder for {@link KeepRefereeOptionsType}:
|
|
5
|
+
*
|
|
6
|
+
* new KeepReferee(
|
|
7
|
+
* KeepRefereeOptions.create().withRefereeAddress('sys@10.0.0.1:2551'),
|
|
8
|
+
* );
|
|
9
|
+
*/
|
|
10
|
+
export class KeepRefereeOptionsBuilder extends OptionsBuilder {
|
|
11
|
+
/** Start a fresh builder. */
|
|
12
|
+
static create() {
|
|
13
|
+
return new KeepRefereeOptionsBuilder();
|
|
14
|
+
}
|
|
15
|
+
/** Fixed referee address; the partition containing it survives. */
|
|
16
|
+
withRefereeAddress(refereeAddress) {
|
|
17
|
+
return this.set('refereeAddress', refereeAddress);
|
|
18
|
+
}
|
|
19
|
+
/** Down everyone if the referee side has fewer than this many members. */
|
|
20
|
+
withDownAllIfBelowQuorum(count) {
|
|
21
|
+
return this.set('downAllIfBelowQuorum', count);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** Validates resolved {@link KeepRefereeOptionsType} settings. */
|
|
25
|
+
export class KeepRefereeOptionsValidator extends OptionsValidator {
|
|
26
|
+
constructor() {
|
|
27
|
+
super('KeepRefereeOptions');
|
|
28
|
+
}
|
|
29
|
+
rules(s) {
|
|
30
|
+
if (s.refereeAddress === undefined)
|
|
31
|
+
this.fail('refereeAddress', 'is required');
|
|
32
|
+
this.nonEmptyString('refereeAddress');
|
|
33
|
+
this.positiveInt('downAllIfBelowQuorum');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Value alias so `KeepRefereeOptions.create()` / `new KeepRefereeOptions()` resolve to the builder. */
|
|
37
|
+
export const KeepRefereeOptions = KeepRefereeOptionsBuilder;
|
|
38
|
+
//# sourceMappingURL=KeepRefereeOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeepRefereeOptions.js","sourceRoot":"","sources":["../../../src/cluster/downing/KeepRefereeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAalE;;;;;;GAMG;AACH,MAAM,OAAO,yBAA0B,SAAQ,cAAsC;IACnF,6BAA6B;IAC7B,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,yBAAyB,EAAE,CAAC;IACzC,CAAC;IAED,mEAAmE;IACnE,kBAAkB,CAAC,cAAsB;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,0EAA0E;IAC1E,wBAAwB,CAAC,KAAa;QACpC,OAAO,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAED,kEAAkE;AAClE,MAAM,OAAO,2BAA4B,SAAQ,gBAAwC;IACvF;QACE,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC9B,CAAC;IACS,KAAK,CAAC,CAAkC;QAChD,IAAI,CAAC,CAAC,cAAc,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAC3C,CAAC;CACF;AAQD,wGAAwG;AACxG,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC"}
|
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import type { Lease } from '../../coordination/Lease.js';
|
|
2
1
|
import { type ClusterPartitionView, type DowningDecision, type DowningProvider } from './DowningProvider.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* External arbiter — typically a `KubernetesLease` so both sides
|
|
6
|
-
* of a partition reach the same K8s API and only one acquires.
|
|
7
|
-
* Each replica owns its own `Lease` instance with a distinct
|
|
8
|
-
* `owner` (its node address); the underlying lease record is
|
|
9
|
-
* shared (same `name`).
|
|
10
|
-
*/
|
|
11
|
-
readonly lease: Lease;
|
|
12
|
-
/**
|
|
13
|
-
* Hard ceiling on a single `acquire()` attempt. After this we
|
|
14
|
-
* return no decision and let the next failure-detection tick
|
|
15
|
-
* trigger a fresh attempt. Default: 5 s.
|
|
16
|
-
*/
|
|
17
|
-
readonly acquireTimeoutMs?: number;
|
|
18
|
-
/** If set, only members carrying this role count toward the majority. */
|
|
19
|
-
readonly role?: string;
|
|
20
|
-
}
|
|
2
|
+
import type { LeaseMajorityOptions } from './LeaseMajorityOptions.js';
|
|
21
3
|
/**
|
|
22
4
|
* Split-brain resolver that uses an external `Lease` to break ties
|
|
23
5
|
* when the cluster splits into equal-sized partitions — the case
|
|
@@ -46,9 +28,41 @@ export interface LeaseMajoritySettings {
|
|
|
46
28
|
* `acquire()` rejects → strategy stays in pending state and returns
|
|
47
29
|
* an empty decision. Better to wait than to risk both sides
|
|
48
30
|
* surviving.
|
|
31
|
+
*
|
|
32
|
+
* **Slow / hung acquire (#142 split-brain hardening)**
|
|
33
|
+
*
|
|
34
|
+
* If `lease.acquire()` hasn't resolved by `acquireTimeoutMs`, the
|
|
35
|
+
* defence-in-depth logic kicks in:
|
|
36
|
+
*
|
|
37
|
+
* - **Epoch invalidation** — every kickoff captures a monotonic
|
|
38
|
+
* `acquireEpoch`. The timeout-recovery bumps the epoch, so a
|
|
39
|
+
* late-arriving result from the timed-out attempt is dropped
|
|
40
|
+
* (it can't write a stale `decision`).
|
|
41
|
+
* - **Release-on-abandon** — we fire-and-forget `lease.release()`
|
|
42
|
+
* to undo any acquire that may have succeeded on the wire
|
|
43
|
+
* after we gave up locally. Without this, an acquire that
|
|
44
|
+
* timed out on the client but succeeded on the server leaves
|
|
45
|
+
* the lease record claimed without anyone observing the win —
|
|
46
|
+
* a classic stale-token split-brain vector.
|
|
47
|
+
* - **Fail-safe on release failure** — if the abandoning release
|
|
48
|
+
* itself rejects, the lease state is now ambiguous (we may or
|
|
49
|
+
* may not hold it; we can't tell). The strategy enters
|
|
50
|
+
* fail-safe: every subsequent `decide()` for the same partition
|
|
51
|
+
* view returns an empty decision, refusing to claim majority
|
|
52
|
+
* until the partition heals (which resets the fail-safe flag).
|
|
53
|
+
*
|
|
54
|
+
* **Fencing tokens (optional)**
|
|
55
|
+
*
|
|
56
|
+
* If the underlying `Lease` implements `acquireWithToken()` (K8s
|
|
57
|
+
* Lease's `resourceVersion`, Redis SETNX with counter, etc.), the
|
|
58
|
+
* strategy uses it instead of plain `acquire()`. The token isn't
|
|
59
|
+
* inspected at decide-time — the local epoch is the source of
|
|
60
|
+
* truth for "is this result still valid?" — but having the token
|
|
61
|
+
* means tighter integration with the underlying lease's native
|
|
62
|
+
* fencing primitive (e.g. release-with-token semantics, when
|
|
63
|
+
* future work adds them).
|
|
49
64
|
*/
|
|
50
65
|
export declare class LeaseMajority implements DowningProvider {
|
|
51
|
-
private readonly settings;
|
|
52
66
|
/** Cached decision once acquire has resolved. Cleared on a fresh
|
|
53
67
|
* partition view so a new split triggers a new acquire. */
|
|
54
68
|
private decision;
|
|
@@ -61,9 +75,37 @@ export declare class LeaseMajority implements DowningProvider {
|
|
|
61
75
|
/** Wall-clock deadline of the in-flight acquire — used to recover
|
|
62
76
|
* if `acquire()` hangs longer than the user's budget. */
|
|
63
77
|
private acquireDeadline;
|
|
64
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Monotonic counter incremented on every acquire kickoff AND on
|
|
80
|
+
* every timeout / reset. `runAcquire` captures the epoch at start
|
|
81
|
+
* and drops its result if the epoch has moved on by the time it
|
|
82
|
+
* resolves — that's the core of #142's stale-acquire protection.
|
|
83
|
+
*/
|
|
84
|
+
private acquireEpoch;
|
|
85
|
+
/**
|
|
86
|
+
* Set when an abandoning `release()` itself failed. The lease's
|
|
87
|
+
* holder identity is now ambiguous and we MUST NOT claim majority
|
|
88
|
+
* until the partition heals (which clears the flag). See #142.
|
|
89
|
+
*/
|
|
90
|
+
private failSafe;
|
|
91
|
+
private readonly options;
|
|
92
|
+
constructor(options: LeaseMajorityOptions);
|
|
65
93
|
decide(view: ClusterPartitionView): DowningDecision;
|
|
94
|
+
/**
|
|
95
|
+
* Run a single acquire attempt, scoped to a captured epoch. The
|
|
96
|
+
* write to `this.decision` only happens if the epoch is still
|
|
97
|
+
* current at resolve time — that's how we drop stale results
|
|
98
|
+
* from a previously-timed-out attempt.
|
|
99
|
+
*/
|
|
66
100
|
private runAcquire;
|
|
101
|
+
/**
|
|
102
|
+
* Best-effort release of any in-flight ownership after a timeout.
|
|
103
|
+
* If the release itself rejects, the lease state is ambiguous and
|
|
104
|
+
* the strategy enters fail-safe. Same epoch as the abandoned
|
|
105
|
+
* acquire — if a fresh acquire has already kicked off (incremented
|
|
106
|
+
* epoch beyond ours), the failure isn't ours to act on.
|
|
107
|
+
*/
|
|
108
|
+
private runAbandonRelease;
|
|
67
109
|
private reset;
|
|
68
110
|
private fingerprintOf;
|
|
69
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaseMajority.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajority.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LeaseMajority.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajority.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAA4B,MAAM,2BAA2B,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,aAAc,YAAW,eAAe;IACnD;gEAC4D;IAC5D,OAAO,CAAC,QAAQ,CAAgC;IAEhD,8CAA8C;IAC9C,OAAO,CAAC,SAAS,CAAS;IAE1B;;4BAEwB;IACxB,OAAO,CAAC,eAAe,CAAuB;IAE9C;8DAC0D;IAC1D,OAAO,CAAC,eAAe,CAAK;IAE5B;;;;;OAKG;IACH,OAAO,CAAC,YAAY,CAAK;IAEzB;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2B;gBAEvC,OAAO,EAAE,oBAAoB;IAKzC,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,eAAe;IAsFnD;;;;;OAKG;YACW,UAAU;IA4CxB;;;;;;OAMG;YACW,iBAAiB;IAe/B,OAAO,CAAC,KAAK;IAWb,OAAO,CAAC,aAAa;CAQtB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addrKey, } from './DowningProvider.js';
|
|
2
|
+
import { LeaseMajorityOptionsValidator } from './LeaseMajorityOptions.js';
|
|
2
3
|
/**
|
|
3
4
|
* Split-brain resolver that uses an external `Lease` to break ties
|
|
4
5
|
* when the cluster splits into equal-sized partitions — the case
|
|
@@ -27,9 +28,41 @@ import { addrKey, } from './DowningProvider.js';
|
|
|
27
28
|
* `acquire()` rejects → strategy stays in pending state and returns
|
|
28
29
|
* an empty decision. Better to wait than to risk both sides
|
|
29
30
|
* surviving.
|
|
31
|
+
*
|
|
32
|
+
* **Slow / hung acquire (#142 split-brain hardening)**
|
|
33
|
+
*
|
|
34
|
+
* If `lease.acquire()` hasn't resolved by `acquireTimeoutMs`, the
|
|
35
|
+
* defence-in-depth logic kicks in:
|
|
36
|
+
*
|
|
37
|
+
* - **Epoch invalidation** — every kickoff captures a monotonic
|
|
38
|
+
* `acquireEpoch`. The timeout-recovery bumps the epoch, so a
|
|
39
|
+
* late-arriving result from the timed-out attempt is dropped
|
|
40
|
+
* (it can't write a stale `decision`).
|
|
41
|
+
* - **Release-on-abandon** — we fire-and-forget `lease.release()`
|
|
42
|
+
* to undo any acquire that may have succeeded on the wire
|
|
43
|
+
* after we gave up locally. Without this, an acquire that
|
|
44
|
+
* timed out on the client but succeeded on the server leaves
|
|
45
|
+
* the lease record claimed without anyone observing the win —
|
|
46
|
+
* a classic stale-token split-brain vector.
|
|
47
|
+
* - **Fail-safe on release failure** — if the abandoning release
|
|
48
|
+
* itself rejects, the lease state is now ambiguous (we may or
|
|
49
|
+
* may not hold it; we can't tell). The strategy enters
|
|
50
|
+
* fail-safe: every subsequent `decide()` for the same partition
|
|
51
|
+
* view returns an empty decision, refusing to claim majority
|
|
52
|
+
* until the partition heals (which resets the fail-safe flag).
|
|
53
|
+
*
|
|
54
|
+
* **Fencing tokens (optional)**
|
|
55
|
+
*
|
|
56
|
+
* If the underlying `Lease` implements `acquireWithToken()` (K8s
|
|
57
|
+
* Lease's `resourceVersion`, Redis SETNX with counter, etc.), the
|
|
58
|
+
* strategy uses it instead of plain `acquire()`. The token isn't
|
|
59
|
+
* inspected at decide-time — the local epoch is the source of
|
|
60
|
+
* truth for "is this result still valid?" — but having the token
|
|
61
|
+
* means tighter integration with the underlying lease's native
|
|
62
|
+
* fencing primitive (e.g. release-with-token semantics, when
|
|
63
|
+
* future work adds them).
|
|
30
64
|
*/
|
|
31
65
|
export class LeaseMajority {
|
|
32
|
-
settings;
|
|
33
66
|
/** Cached decision once acquire has resolved. Cleared on a fresh
|
|
34
67
|
* partition view so a new split triggers a new acquire. */
|
|
35
68
|
decision = null;
|
|
@@ -42,18 +75,33 @@ export class LeaseMajority {
|
|
|
42
75
|
/** Wall-clock deadline of the in-flight acquire — used to recover
|
|
43
76
|
* if `acquire()` hangs longer than the user's budget. */
|
|
44
77
|
acquireDeadline = 0;
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Monotonic counter incremented on every acquire kickoff AND on
|
|
80
|
+
* every timeout / reset. `runAcquire` captures the epoch at start
|
|
81
|
+
* and drops its result if the epoch has moved on by the time it
|
|
82
|
+
* resolves — that's the core of #142's stale-acquire protection.
|
|
83
|
+
*/
|
|
84
|
+
acquireEpoch = 0;
|
|
85
|
+
/**
|
|
86
|
+
* Set when an abandoning `release()` itself failed. The lease's
|
|
87
|
+
* holder identity is now ambiguous and we MUST NOT claim majority
|
|
88
|
+
* until the partition heals (which clears the flag). See #142.
|
|
89
|
+
*/
|
|
90
|
+
failSafe = false;
|
|
91
|
+
options;
|
|
92
|
+
constructor(options) {
|
|
93
|
+
this.options = options;
|
|
94
|
+
new LeaseMajorityOptionsValidator().validate(this.options);
|
|
47
95
|
}
|
|
48
96
|
decide(view) {
|
|
49
97
|
const candidates = view.allMembers.filter((m) => (m.status === 'up' || m.status === 'leaving' || m.status === 'unreachable') &&
|
|
50
|
-
(!this.
|
|
98
|
+
(!this.options.role || m.hasRole(this.options.role)));
|
|
51
99
|
if (candidates.length === 0)
|
|
52
100
|
return new Set();
|
|
53
101
|
const reachable = candidates.filter((m) => !view.unreachable.has(addrKey(m)));
|
|
54
102
|
const unreachable = candidates.filter((m) => view.unreachable.has(addrKey(m)));
|
|
55
|
-
const
|
|
56
|
-
const needed = Math.floor(
|
|
103
|
+
const count = candidates.length;
|
|
104
|
+
const needed = Math.floor(count / 2) + 1;
|
|
57
105
|
const fingerprint = this.fingerprintOf(reachable, unreachable);
|
|
58
106
|
// No partition (everyone reachable) → reset state, no decision.
|
|
59
107
|
if (unreachable.length === 0) {
|
|
@@ -78,6 +126,15 @@ export class LeaseMajority {
|
|
|
78
126
|
}
|
|
79
127
|
// Equal-size partition (or stuck-quorum corner case) — Lease
|
|
80
128
|
// arbitration kicks in.
|
|
129
|
+
// Fail-safe: a prior abandon-release failed and the lease state
|
|
130
|
+
// is ambiguous. Refuse to claim majority until the partition
|
|
131
|
+
// heals (which clears the flag via reset()). Refuses to even
|
|
132
|
+
// kick off a fresh acquire — we don't know whether we already
|
|
133
|
+
// hold the lease, so a fresh acquire might "succeed" trivially
|
|
134
|
+
// (same-owner renew) and give us a false win. #142.
|
|
135
|
+
if (this.failSafe) {
|
|
136
|
+
return new Set();
|
|
137
|
+
}
|
|
81
138
|
if (this.decision !== null) {
|
|
82
139
|
// Cached from a prior tick on this same view.
|
|
83
140
|
return this.decision;
|
|
@@ -85,45 +142,113 @@ export class LeaseMajority {
|
|
|
85
142
|
if (this.acquiring) {
|
|
86
143
|
// Recover if the acquire stalled past its budget. The Lease
|
|
87
144
|
// implementation is supposed to honour its own retry/timeout
|
|
88
|
-
//
|
|
89
|
-
// the deadline,
|
|
90
|
-
//
|
|
145
|
+
// options, but defence-in-depth: if it hasn't resolved by
|
|
146
|
+
// the deadline, bump the epoch (so the late result is dropped)
|
|
147
|
+
// and proactively release any in-flight ownership — see #142.
|
|
91
148
|
if (Date.now() > this.acquireDeadline) {
|
|
92
149
|
this.acquiring = false;
|
|
150
|
+
// Bump the epoch FIRST so the late runAcquire bails out before
|
|
151
|
+
// it can touch `this.decision`.
|
|
152
|
+
this.acquireEpoch += 1;
|
|
153
|
+
// Fire-and-forget release. If it rejects, the lease state is
|
|
154
|
+
// ambiguous and we must enter fail-safe — see runAbandonRelease.
|
|
155
|
+
void this.runAbandonRelease();
|
|
93
156
|
}
|
|
94
157
|
return new Set();
|
|
95
158
|
}
|
|
96
159
|
const surviveSet = new Set(unreachable.map(addrKey));
|
|
97
160
|
const downSelfSet = new Set(reachable.map(addrKey));
|
|
98
161
|
this.acquiring = true;
|
|
99
|
-
this.acquireDeadline = Date.now() + (this.
|
|
100
|
-
|
|
162
|
+
this.acquireDeadline = Date.now() + (this.options.acquireTimeoutMs ?? 5_000);
|
|
163
|
+
this.acquireEpoch += 1;
|
|
164
|
+
const myEpoch = this.acquireEpoch;
|
|
165
|
+
void this.runAcquire(myEpoch, surviveSet, downSelfSet);
|
|
101
166
|
return new Set();
|
|
102
167
|
}
|
|
103
168
|
/* ------------------------------ internals ------------------------------ */
|
|
104
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Run a single acquire attempt, scoped to a captured epoch. The
|
|
171
|
+
* write to `this.decision` only happens if the epoch is still
|
|
172
|
+
* current at resolve time — that's how we drop stale results
|
|
173
|
+
* from a previously-timed-out attempt.
|
|
174
|
+
*/
|
|
175
|
+
async runAcquire(myEpoch, surviveSet, downSelfSet) {
|
|
105
176
|
let won;
|
|
106
177
|
try {
|
|
107
|
-
|
|
178
|
+
// Prefer the fencing-token API when the backend implements it.
|
|
179
|
+
// The token isn't inspected here (local epoch is sufficient for
|
|
180
|
+
// stale detection at decide-time), but using the API where
|
|
181
|
+
// available means the underlying lease's native fencing
|
|
182
|
+
// primitive participates in the round-trip — useful for backend-
|
|
183
|
+
// specific consistency checks and a stepping-stone for future
|
|
184
|
+
// release-with-token semantics.
|
|
185
|
+
if (typeof this.options.lease.acquireWithToken === 'function') {
|
|
186
|
+
const result = await this.options.lease.acquireWithToken();
|
|
187
|
+
won = result !== null;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
won = await this.options.lease.acquire();
|
|
191
|
+
}
|
|
108
192
|
}
|
|
109
193
|
catch {
|
|
110
194
|
// Lease backend unreachable — stay pending. The next decide()
|
|
111
195
|
// call sees `acquiring=false` (we clear it below) and restarts.
|
|
112
|
-
|
|
196
|
+
// But only if our epoch is still current; otherwise the timeout
|
|
197
|
+
// path has already moved on and we should not touch shared state.
|
|
198
|
+
if (myEpoch === this.acquireEpoch) {
|
|
199
|
+
this.acquiring = false;
|
|
200
|
+
}
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
// Stale resolve: the defence-in-depth timeout (or a reset()) has
|
|
204
|
+
// already invalidated this attempt. Drop the result silently —
|
|
205
|
+
// a fresh acquire is either already in flight or will be kicked
|
|
206
|
+
// off on the next decide(). Critical for #142: without this
|
|
207
|
+
// guard a slow `acquire() → true` could write `decision=surviveSet`
|
|
208
|
+
// after the operator considered the attempt abandoned, producing
|
|
209
|
+
// a split-brain where both sides "win".
|
|
210
|
+
if (myEpoch !== this.acquireEpoch) {
|
|
113
211
|
return;
|
|
114
212
|
}
|
|
115
213
|
this.acquiring = false;
|
|
116
214
|
this.decision = won ? surviveSet : downSelfSet;
|
|
117
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Best-effort release of any in-flight ownership after a timeout.
|
|
218
|
+
* If the release itself rejects, the lease state is ambiguous and
|
|
219
|
+
* the strategy enters fail-safe. Same epoch as the abandoned
|
|
220
|
+
* acquire — if a fresh acquire has already kicked off (incremented
|
|
221
|
+
* epoch beyond ours), the failure isn't ours to act on.
|
|
222
|
+
*/
|
|
223
|
+
async runAbandonRelease() {
|
|
224
|
+
const myEpoch = this.acquireEpoch;
|
|
225
|
+
try {
|
|
226
|
+
await this.options.lease.release();
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
// Release failed. We may or may not hold the lease — we can't
|
|
230
|
+
// tell. Mark fail-safe so we don't claim majority on this
|
|
231
|
+
// view. But only if our epoch is still current; if a partition
|
|
232
|
+
// heal has already reset() us, this older failure is moot.
|
|
233
|
+
if (myEpoch === this.acquireEpoch) {
|
|
234
|
+
this.failSafe = true;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
118
238
|
reset() {
|
|
119
239
|
this.decision = null;
|
|
120
240
|
this.acquiring = false;
|
|
121
241
|
this.lastFingerprint = null;
|
|
242
|
+
this.failSafe = false;
|
|
243
|
+
// Bump the epoch so any in-flight runAcquire from before the
|
|
244
|
+
// reset drops its result instead of writing to the cleared
|
|
245
|
+
// decision.
|
|
246
|
+
this.acquireEpoch += 1;
|
|
122
247
|
}
|
|
123
248
|
fingerprintOf(reachable, unreachable) {
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
return `R[${
|
|
249
|
+
const reachableKey = reachable.map((m) => m.address.toString()).sort().join(',');
|
|
250
|
+
const unreachableKey = unreachable.map((m) => m.address.toString()).sort().join(',');
|
|
251
|
+
return `R[${reachableKey}]|U[${unreachableKey}]`;
|
|
127
252
|
}
|
|
128
253
|
}
|
|
129
254
|
//# sourceMappingURL=LeaseMajority.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaseMajority.js","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajority.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LeaseMajority.js","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajority.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Lease } from '../../coordination/Lease.js';
|
|
2
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
3
|
+
import { OptionsValidator } from '../../util/OptionsValidator.js';
|
|
4
|
+
/** Plain options-object shape accepted by {@link LeaseMajority}. */
|
|
5
|
+
export interface LeaseMajorityOptionsType {
|
|
6
|
+
/**
|
|
7
|
+
* External arbiter — typically a `KubernetesLease` so both sides
|
|
8
|
+
* of a partition reach the same K8s API and only one acquires.
|
|
9
|
+
* Each replica owns its own `Lease` instance with a distinct
|
|
10
|
+
* `owner` (its node address); the underlying lease record is
|
|
11
|
+
* shared (same `name`).
|
|
12
|
+
*/
|
|
13
|
+
readonly lease: Lease;
|
|
14
|
+
/**
|
|
15
|
+
* Hard ceiling on a single `acquire()` attempt. After this we
|
|
16
|
+
* return no decision and let the next failure-detection tick
|
|
17
|
+
* trigger a fresh attempt. Default: 5 s.
|
|
18
|
+
*/
|
|
19
|
+
readonly acquireTimeoutMs?: number;
|
|
20
|
+
/** If set, only members carrying this role count toward the majority. */
|
|
21
|
+
readonly role?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Fluent builder for {@link LeaseMajorityOptionsType}:
|
|
25
|
+
*
|
|
26
|
+
* new LeaseMajority(
|
|
27
|
+
* LeaseMajorityOptions.create()
|
|
28
|
+
* .withLease(kubernetesLease)
|
|
29
|
+
* .withAcquireTimeoutMs(5_000),
|
|
30
|
+
* );
|
|
31
|
+
*/
|
|
32
|
+
export declare class LeaseMajorityOptionsBuilder extends OptionsBuilder<LeaseMajorityOptionsType> {
|
|
33
|
+
/** Start a fresh builder. */
|
|
34
|
+
static create(): LeaseMajorityOptionsBuilder;
|
|
35
|
+
/** External arbiter lease — both sides of a partition contend for it. */
|
|
36
|
+
withLease(lease: Lease): this;
|
|
37
|
+
/** Hard ceiling on a single `acquire()` attempt in ms. Default 5 s. */
|
|
38
|
+
withAcquireTimeoutMs(ms: number): this;
|
|
39
|
+
/** Only members carrying this role count toward the majority. */
|
|
40
|
+
withRole(role: string): this;
|
|
41
|
+
}
|
|
42
|
+
/** Validates resolved {@link LeaseMajorityOptionsType} settings. */
|
|
43
|
+
export declare class LeaseMajorityOptionsValidator extends OptionsValidator<LeaseMajorityOptionsType> {
|
|
44
|
+
constructor();
|
|
45
|
+
protected rules(_s: Partial<LeaseMajorityOptionsType>): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Accepted input for the {@link LeaseMajority} constructor: the fluent
|
|
49
|
+
* {@link LeaseMajorityOptionsBuilder} OR a plain {@link LeaseMajorityOptionsType}
|
|
50
|
+
* object.
|
|
51
|
+
*/
|
|
52
|
+
export type LeaseMajorityOptions = LeaseMajorityOptionsBuilder | Partial<LeaseMajorityOptionsType>;
|
|
53
|
+
/** Value alias so `LeaseMajorityOptions.create()` / `new LeaseMajorityOptions()` resolve to the builder. */
|
|
54
|
+
export declare const LeaseMajorityOptions: typeof LeaseMajorityOptionsBuilder;
|
|
55
|
+
//# sourceMappingURL=LeaseMajorityOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeaseMajorityOptions.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajorityOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,oEAAoE;AACpE,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,yEAAyE;IACzE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,SAAQ,cAAc,CAAC,wBAAwB,CAAC;IACvF,6BAA6B;IAC7B,MAAM,CAAC,MAAM,IAAI,2BAA2B;IAI5C,yEAAyE;IACzE,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI7B,wEAAwE;IACxE,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAItC,iEAAiE;IACjE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAG7B;AAED,oEAAoE;AACpE,qBAAa,6BAA8B,SAAQ,gBAAgB,CAAC,wBAAwB,CAAC;;IAI3F,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI;CAG7D;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACnG,4GAA4G;AAC5G,eAAO,MAAM,oBAAoB,oCAA8B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OptionsBuilder } from '../../util/OptionsBuilder.js';
|
|
2
|
+
import { OptionsValidator } from '../../util/OptionsValidator.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fluent builder for {@link LeaseMajorityOptionsType}:
|
|
5
|
+
*
|
|
6
|
+
* new LeaseMajority(
|
|
7
|
+
* LeaseMajorityOptions.create()
|
|
8
|
+
* .withLease(kubernetesLease)
|
|
9
|
+
* .withAcquireTimeoutMs(5_000),
|
|
10
|
+
* );
|
|
11
|
+
*/
|
|
12
|
+
export class LeaseMajorityOptionsBuilder extends OptionsBuilder {
|
|
13
|
+
/** Start a fresh builder. */
|
|
14
|
+
static create() {
|
|
15
|
+
return new LeaseMajorityOptionsBuilder();
|
|
16
|
+
}
|
|
17
|
+
/** External arbiter lease — both sides of a partition contend for it. */
|
|
18
|
+
withLease(lease) {
|
|
19
|
+
return this.set('lease', lease);
|
|
20
|
+
}
|
|
21
|
+
/** Hard ceiling on a single `acquire()` attempt in ms. Default 5 s. */
|
|
22
|
+
withAcquireTimeoutMs(ms) {
|
|
23
|
+
return this.set('acquireTimeoutMs', ms);
|
|
24
|
+
}
|
|
25
|
+
/** Only members carrying this role count toward the majority. */
|
|
26
|
+
withRole(role) {
|
|
27
|
+
return this.set('role', role);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Validates resolved {@link LeaseMajorityOptionsType} settings. */
|
|
31
|
+
export class LeaseMajorityOptionsValidator extends OptionsValidator {
|
|
32
|
+
constructor() {
|
|
33
|
+
super('LeaseMajorityOptions');
|
|
34
|
+
}
|
|
35
|
+
rules(_s) {
|
|
36
|
+
this.positiveNumber('acquireTimeoutMs');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** Value alias so `LeaseMajorityOptions.create()` / `new LeaseMajorityOptions()` resolve to the builder. */
|
|
40
|
+
export const LeaseMajorityOptions = LeaseMajorityOptionsBuilder;
|
|
41
|
+
//# sourceMappingURL=LeaseMajorityOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeaseMajorityOptions.js","sourceRoot":"","sources":["../../../src/cluster/downing/LeaseMajorityOptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAsBlE;;;;;;;;GAQG;AACH,MAAM,OAAO,2BAA4B,SAAQ,cAAwC;IACvF,6BAA6B;IAC7B,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC3C,CAAC;IAED,yEAAyE;IACzE,SAAS,CAAC,KAAY;QACpB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,wEAAwE;IACxE,oBAAoB,CAAC,EAAU;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,iEAAiE;IACjE,QAAQ,CAAC,IAAY;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAED,oEAAoE;AACpE,MAAM,OAAO,6BAA8B,SAAQ,gBAA0C;IAC3F;QACE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChC,CAAC;IACS,KAAK,CAAC,EAAqC;QACnD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC1C,CAAC;CACF;AAQD,4GAA4G;AAC5G,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { type ClusterPartitionView, type DowningDecision, type DowningProvider } from './DowningProvider.js';
|
|
2
|
-
|
|
3
|
-
/** Exact size of the quorum needed on the reachable side. */
|
|
4
|
-
readonly quorumSize: number;
|
|
5
|
-
/** If set, only members carrying this role count toward quorum. */
|
|
6
|
-
readonly role?: string;
|
|
7
|
-
}
|
|
2
|
+
import type { StaticQuorumOptions } from './StaticQuorumOptions.js';
|
|
8
3
|
/**
|
|
9
4
|
* "Static quorum" — as long as at least `quorumSize` reachable members are
|
|
10
5
|
* up on this side, keep them and down the rest. Otherwise, down ourselves.
|
|
@@ -14,8 +9,8 @@ export interface StaticQuorumSettings {
|
|
|
14
9
|
* shrink below the threshold.
|
|
15
10
|
*/
|
|
16
11
|
export declare class StaticQuorum implements DowningProvider {
|
|
17
|
-
private readonly
|
|
18
|
-
constructor(
|
|
12
|
+
private readonly options;
|
|
13
|
+
constructor(options: StaticQuorumOptions);
|
|
19
14
|
decide(view: ClusterPartitionView): DowningDecision;
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=StaticQuorum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticQuorum.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/StaticQuorum.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,
|
|
1
|
+
{"version":3,"file":"StaticQuorum.d.ts","sourceRoot":"","sources":["../../../src/cluster/downing/StaticQuorum.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAA2B,MAAM,0BAA0B,CAAC;AAE7F;;;;;;;GAOG;AACH,qBAAa,YAAa,YAAW,eAAe;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;gBAEtC,OAAO,EAAE,mBAAmB;IAKxC,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,eAAe;CAepD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addrKey, } from './DowningProvider.js';
|
|
2
|
+
import { StaticQuorumOptionsValidator } from './StaticQuorumOptions.js';
|
|
2
3
|
/**
|
|
3
4
|
* "Static quorum" — as long as at least `quorumSize` reachable members are
|
|
4
5
|
* up on this side, keep them and down the rest. Otherwise, down ourselves.
|
|
@@ -8,19 +9,17 @@ import { addrKey, } from './DowningProvider.js';
|
|
|
8
9
|
* shrink below the threshold.
|
|
9
10
|
*/
|
|
10
11
|
export class StaticQuorum {
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
this.
|
|
14
|
-
|
|
15
|
-
throw new Error('StaticQuorum: quorumSize must be >= 1');
|
|
16
|
-
}
|
|
12
|
+
options;
|
|
13
|
+
constructor(options) {
|
|
14
|
+
this.options = options;
|
|
15
|
+
new StaticQuorumOptionsValidator().validate(this.options);
|
|
17
16
|
}
|
|
18
17
|
decide(view) {
|
|
19
18
|
const candidates = view.allMembers.filter((m) => (m.status === 'up' || m.status === 'leaving' || m.status === 'unreachable') &&
|
|
20
|
-
(!this.
|
|
19
|
+
(!this.options.role || m.hasRole(this.options.role)));
|
|
21
20
|
const reachable = candidates.filter((m) => !view.unreachable.has(addrKey(m)));
|
|
22
21
|
const unreachable = candidates.filter((m) => view.unreachable.has(addrKey(m)));
|
|
23
|
-
if (reachable.length >= this.
|
|
22
|
+
if (reachable.length >= this.options.quorumSize) {
|
|
24
23
|
return new Set(unreachable.map(addrKey));
|
|
25
24
|
}
|
|
26
25
|
// Not enough reachable — we're below quorum, down ourselves.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticQuorum.js","sourceRoot":"","sources":["../../../src/cluster/downing/StaticQuorum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,GAIR,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StaticQuorum.js","sourceRoot":"","sources":["../../../src/cluster/downing/StaticQuorum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,GAIR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAGxE;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACN,OAAO,CAA0B;IAElD,YAAY,OAA4B;QACtC,IAAI,CAAC,OAAO,GAAG,OAAkC,CAAC;QAClD,IAAI,4BAA4B,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,IAA0B;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9C,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC;YAC3E,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CACrD,CAAC;QAEF,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/E,IAAI,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YAChD,OAAO,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,6DAA6D;QAC7D,OAAO,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACzC,CAAC;CACF"}
|