We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
onInit
Props
Describe the bug Lost onInit property when clone a Props.
To Reproduce
props := actor.PropsFromFunc(func(ctx actor.Context) { switch msg := ctx.Message().(type) { case *actor.Started: fmt.Printf("Started %v", msg) case *shared.Hello: fmt.Printf("Hello %v\n", msg.Name) } }, actor.WithOnInit(func(ctx actor.Context) { // It does not execute the OnInit callback when spawn a "hello" kind actor. fmt.Printf("OnInit %v", ctx) })) helloKind := cluster.NewKind("hello", props)
Expected behavior It can print OnInit {{xxx}} when spawn a "hello" kind actor.
The text was updated successfully, but these errors were encountered:
I create a PR for this. #830
Sorry, something went wrong.
66c886e
No branches or pull requests
Describe the bug
Lost
onInit
property when clone aProps
.To Reproduce
Expected behavior
It can print OnInit {{xxx}} when spawn a "hello" kind actor.
The text was updated successfully, but these errors were encountered: