Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scaladoc for ClusterShardingLocal and DataCenter #266

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) }
}
}