Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
actor
✓ github.com/asynkron/protoactor-go
Creates an actor system, spawns an actor, and sends a message.
package main
import (
"fmt"
"github.com/asynkron/protoactor-go/actor"
)
type helloActor struct{}
func (h *helloActor) Receive(ctx actor.Context) {
switch msg := ctx.Message().(type) {
case string:
fmt.Println("Hello", msg)
}
}
func main() {
system := actor.NewActorSystem()
props := actor.PropsFromProducer(func() actor.Actor { return &helloActor{} })
pid := system.Root.Spawn(props)
system.Root.Send(pid, "World")
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20240116091649-93e384a26d0dlatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.