Skip to content

Commit 78f458d

Browse files
committed
getNumberOfPods -> getPods
1 parent 752ac10 commit 78f458d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

entities/src/main/scala/com/devsisters/shardcake/Sharding.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class Sharding private (
108108
pod = shards.get(shardId)
109109
} yield pod.contains(address)
110110

111-
def getNumberOfPods: UIO[Int] =
112-
shardAssignments.get.map(_.values.toSet.size)
111+
def getPods: UIO[Set[PodAddress]] =
112+
shardAssignments.get.map(_.values.toSet)
113113

114114
private[shardcake] val refreshAssignments: ZManaged[Clock, Nothing, Unit] = {
115115
val assignmentStream =
@@ -387,8 +387,8 @@ object Sharding {
387387
ZIO.service[Sharding].map(_.messenger(entityType))
388388

389389
/**
390-
* Get the number of pods currently registered to the Shard Manager
390+
* Get the list of pods currently registered to the Shard Manager
391391
*/
392-
def getNumberOfPods: RIO[Has[Sharding], Int] =
393-
ZIO.serviceWith[Sharding](_.getNumberOfPods)
392+
def getPods: RIO[Has[Sharding], Set[PodAddress]] =
393+
ZIO.serviceWith[Sharding](_.getPods)
394394
}

0 commit comments

Comments
 (0)