Skip to content

Commit

Permalink
Add scaladoc for ClusterShardingLocal and DataCenter
Browse files Browse the repository at this point in the history
  • Loading branch information
rtar committed Oct 13, 2023
1 parent 18fe5d9 commit 2e58bae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ import scala.concurrent.Promise
import scala.concurrent.duration._
import scala.util.Try


/** Stub for [[ClusterSharding]] to be used in the unit tests. */
trait ClusterShardingLocal[F[_]] {

/** Provides the actual stub */
def clusterSharding: ClusterSharding[F]

/** Simulate cluster rebalacing.
*
* I.e. send `handOffStopMessage` from [[ClusterSharding#startProxy]] to the
* actors that need rebalancing according to `shardAllocationStrategy`.
*/
def rebalance: F[Unit]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.evolutiongaming.akkaeffect.cluster
import cats.{Order, Show}
import pureconfig.ConfigReader


/** Datacenter where required cluster singletons are located */
final case class DataCenter(value: String) {

override def toString: String = value
Expand All @@ -16,4 +16,4 @@ object DataCenter {
implicit val showDataCenter: Show[DataCenter] = Show.fromToString

implicit val configReaderDataCenter: ConfigReader[DataCenter] = ConfigReader[String].map { a => DataCenter(a) }
}
}

0 comments on commit 2e58bae

Please sign in to comment.