package main
import (
"flag"
"time"
"cluster-metrics/shared"
console "github.com/AsynkronIT/goconsole"
"github.com/AsynkronIT/protoactor-go/actor"
"github.com/AsynkronIT/protoactor-go/cluster"
"github.com/AsynkronIT/protoactor-go/remote"
zk "github.com/qjpcpu/proto.actor-zk"
)
func main() {
port := flag.Int("port", 0, "")
ip := flag.String("ip", "127.0.0.1", "")
flag.Parse()
system := actor.NewActorSystem()
remoteConfig := remote.Configure(*ip, *port)
props := actor.PropsFromProducer(newHelloActor)
helloKind := cluster.NewKind("Hello", props)
provider, _ := zk.New([]string{"127.0.0.1:2181"}, zk.WithBaseKey("proto.actors"))
clusterConfig := cluster.Configure("my_cluster", provider, remoteConfig, helloKind)
c := cluster.New(system, clusterConfig)
c.Start()
_, _ = console.ReadLine()
c.Shutdown(true)
}
-
Notifications
You must be signed in to change notification settings - Fork 0
qjpcpu/proto.actor-zk
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published