-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor proto actor runtime with snapshot support (#3283)
* Initial working grain * Incremental work on actor bookmark management & resuming wokflows * Upgrade Proto Actor package references * Fix lifetime of actors * Implement bookmark and resumption * Update Program.cs * Update bookmark event publishing * Refactor proto actor features API * Implement snapshotting * Update snapshotting * Add in-memory provider and use it by default * Update server bundle to use proto actor sqlite persistence by default
- Loading branch information
1 parent
6f5a029
commit e2ffafc
Showing
98 changed files
with
1,510 additions
and
1,487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
src/modules/Elsa.ProtoActor.Kubernetes/DependencyInjectionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
using System; | ||
using Elsa.ProtoActor.Common; | ||
using Elsa.ProtoActor.Configuration; | ||
using Elsa.Features.Extensions; | ||
using Elsa.ProtoActor.Features; | ||
|
||
namespace Elsa.ProtoActor.Kubernetes; | ||
|
||
public static class DependencyInjectionExtensions | ||
{ | ||
public static ProtoActorFeature WithKubernetesProvider(this ProtoActorFeature protoActorFeature, Action<KubernetesProviderOptions> providerOptions) | ||
public static ProtoActorFeature UseKubernetes(this ProtoActorFeature protoActorFeature, Action<KubernetesProtoActorFeature>? kubernetesFeature = default) | ||
{ | ||
var options = new KubernetesProviderOptions(); | ||
providerOptions?.Invoke(options); | ||
|
||
protoActorFeature.ConfigureProtoActorBuilder(sp => | ||
new ProtoActorBuilder().UseKubernetesProvider(options).Build()); | ||
protoActorFeature.Module.Use<KubernetesProtoActorFeature>(feature => kubernetesFeature?.Invoke(feature)); | ||
return protoActorFeature; | ||
} | ||
} |
Oops, something went wrong.