This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.typed.Behavior | |
import akka.actor.typed.scaladsl.Behaviors | |
import sample.FollowerActor.ExecTask | |
import scala.concurrent.duration.DurationInt | |
object LeaderActor { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit | |
import org.mockito.MockitoSugar.{mock, when} | |
import org.scalatest.wordspec.AnyWordSpecLike | |
import sample.FollowerActor.ExecTask | |
import sample.LeaderActor.{Failed, Finish} | |
import scala.concurrent.Future |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.testkit.typed.CapturedLogEvent | |
import akka.actor.testkit.typed.Effect.TimerScheduled | |
import akka.actor.testkit.typed.scaladsl.{ | |
BehaviorTestKit, | |
ScalaTestWithActorTestKit | |
} | |
import org.scalatest.wordspec.AnyWordSpecLike | |
import org.slf4j.event.Level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.typed.ActorSystem | |
object App { | |
def main(args: Array[String]): Unit = { | |
ActorSystem[LeaderActor.Command](LeaderActor(Modules), "LeaderActor") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
trait Modules { | |
val followerOperation: FollowerOperation | |
val leaderOperation: LeaderOperation | |
} | |
import com.softwaremill.macwire.wire | |
object Modules extends Modules { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.typed.{ActorRef, Behavior} | |
import akka.actor.typed.scaladsl.Behaviors | |
import sample.LeaderActor.{Failed, Finish} | |
import scala.concurrent.Future | |
import scala.util.{Failure, Success} | |
object FollowerActor { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import akka.actor.typed.Behavior | |
import akka.actor.typed.scaladsl.Behaviors | |
import sample.FollowerActor.ExecTask | |
import scala.concurrent.duration.DurationInt | |
object LeaderActor { |