Feature request: Pluggable actor factories
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the proposal
I would like to be able to inject dependencies into my Actor instances as they are activated. Right now, it appears that the [ActorManager's createActor function](https://github.com/dapr/js-sdk/blob/76866c878a6e79bb889c83f3930172ddb20f1624/src/actors/runtime/ActorManager.ts#L60) only allows instantiating the class directly. At time of registration, it would be ideal if I could provide an (optional) factory function that could instantiate the class and then hand it back to Dapr to continue. Alternatively, perhaps the runtime could accept a subclass of ActorManager that could extend it to provide custom factory functions.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.