Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for user supplied actor_factory callable #713

Closed
ksachdeva opened this issue May 14, 2024 · 2 comments · Fixed by #714
Closed

Support for user supplied actor_factory callable #713

ksachdeva opened this issue May 14, 2024 · 2 comments · Fixed by #714
Assignees
Labels
kind/enhancement New feature or request
Milestone

Comments

@ksachdeva
Copy link
Contributor

Describe the feature

ActorRuntimeContext has the support to take the user-supplied callable that would instantiate the Actor object. However, the classes (e.g. ActorRuntime and various register_actor functions in the extensions (flask and fastapi)) do not expose the possibility of providing the callable from the user code.

Release Note

RELEASE NOTE: ADD Support for user-supplied actor_factory callable.

@berndverst
Copy link
Member

Can you go into more detail as to why we would want this? And can you see whether any of the other SDKs support this?

@ksachdeva
Copy link
Contributor Author

This would enable dependency injection in the Actors.

See an example of it in the .net SDK
https://github.com/dapr/dotnet-sdk/blob/master/examples/Actor/DemoActor/DemoActor.cs

@berndverst berndverst added this to the v1.14 milestone Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
2 participants