diff --git a/cluster/gossiper.go b/cluster/gossiper.go index b6874da6..dd3465ac 100644 --- a/cluster/gossiper.go +++ b/cluster/gossiper.go @@ -341,7 +341,7 @@ func (g *Gossiper) GetActorCount() map[string]int64 { clusterKinds := g.cluster.GetClusterKinds() for _, kindName := range clusterKinds { kind := g.cluster.GetClusterKind(kindName) - m[kindName] = int64(kind.count) + m[kindName] = int64(kind.Count()) } g.cluster.Logger().Debug("Actor Count", slog.Any("count", m)) diff --git a/cluster/kind.go b/cluster/kind.go index 54493893..2f54ed8c 100644 --- a/cluster/kind.go +++ b/cluster/kind.go @@ -55,3 +55,7 @@ func (ak *ActivatedKind) Inc() { func (ak *ActivatedKind) Dec() { atomic.AddInt32(&ak.count, -1) } + +func (ak *ActivatedKind) Count() int32 { + return atomic.LoadInt32(&ak.count) +}