diff --git a/_examples/actor-jaegertracing/router/main.go b/_examples/actor-jaegertracing/router/main.go index 92169ad9..2adc957d 100644 --- a/_examples/actor-jaegertracing/router/main.go +++ b/_examples/actor-jaegertracing/router/main.go @@ -25,7 +25,8 @@ func main() { NewRootContext(actorSystem, nil). WithSpawnMiddleware(opentracing.TracingMiddleware()) - pid := rootContext.SpawnPrefix(createProps(router.NewRoundRobinPool, 3), "root") + f := router.NewRoundRobinPool + pid := rootContext.SpawnPrefix(createProps(f, 3), "root") for i := 0; i < 3; i++ { _ = rootContext.RequestFuture(pid, &request{i}, 10*time.Second).Wait() } diff --git a/_examples/router-demo/go.mod b/_examples/router-demo/go.mod index e38e561b..b61138cb 100644 --- a/_examples/router-demo/go.mod +++ b/_examples/router-demo/go.mod @@ -8,3 +8,32 @@ require ( github.com/asynkron/goconsole v0.0.0-20160504192649-bfa12eebf716 github.com/asynkron/protoactor-go v0.0.0-00010101000000-000000000000 ) + +require ( + github.com/Workiva/go-datastructures v1.1.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/lithammer/shortuuid/v4 v4.0.0 // indirect + github.com/lmittmann/tint v1.0.3 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/orcaman/concurrent-map v1.0.0 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b // indirect + github.com/twmb/murmur3 v1.1.6 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.39.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/sdk v1.16.0 // indirect + go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect + golang.org/x/sys v0.12.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect +) diff --git a/_examples/router-demo/main.go b/_examples/router-demo/main.go index e72676be..bea5e455 100644 --- a/_examples/router-demo/main.go +++ b/_examples/router-demo/main.go @@ -2,6 +2,7 @@ package main import ( "log" + "log/slog" "strconv" "time" @@ -23,7 +24,7 @@ func main() { act := func(context actor.Context) { switch msg := context.Message().(type) { case *myMessage: - log.Printf("%v got message %d", context.Self(), msg.i) + context.Logger().Info("got message", slog.Any("self", context.Self()), slog.Any("message", msg)) } }