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
| import akka.actor.ActorSystem | |
| import akka.http.scaladsl.Http | |
| import akka.http.scaladsl.model._ | |
| import akka.http.scaladsl.unmarshalling._ | |
| import akka.stream.ActorMaterializer | |
| import scala.concurrent.{Await, Future} | |
| import scala.concurrent.duration._ | |
| object SimpleClient { |
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
| import akka.stream.FlowShape | |
| import akka.stream.scaladsl.FlowGraph | |
| import akka.stream.scaladsl.{Source, Concat, Flow} | |
| import akka.stream.stage.{SyncDirective, Context, PushPullStage} | |
| object Intersperse { | |
| def apply[E](separator: E): Flow[E, E, Unit] = | |
| Flow[E].transform(() => new Intersperse[E](separator)) |
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 streams | |
| import akka.actor.ActorSystem | |
| import akka.stream.ActorAttributes.SupervisionStrategy | |
| import akka.stream.Supervision.Resume | |
| import akka.stream._ | |
| import akka.stream.scaladsl.Source | |
| import akka.stream.stage.{GraphStage, GraphStageLogic} | |
| object ActorMaterializerSettingsApp extends App { |
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
| import akka.actor._ | |
| import akka.cluster.{Cluster, MemberStatus} | |
| import com.typesafe.config.ConfigFactory | |
| import scala.concurrent.Await | |
| import scala.concurrent.duration._ | |
| import scala.io.StdIn | |
| object GracefulLeaveCluster extends App { |
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
| import akka.actor.ActorSystem | |
| import akka.stream._ | |
| import akka.stream.scaladsl._ | |
| import scala.io.StdIn | |
| import scala.util.Random | |
| object SimplePartitionSample extends App { | |
| implicit val system = ActorSystem() |
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 remoting | |
| import akka.actor.{Actor, ActorLogging, ActorSystem, Props} | |
| import com.typesafe.config.ConfigFactory | |
| import scala.io.StdIn | |
| /** | |
| * Created by johan on 2016-08-03. | |
| */ |
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
| import akka.actor.{Actor, ActorSystem, Props} | |
| import akka.http.scaladsl.Http | |
| import akka.http.scaladsl.marshalling._ | |
| import akka.http.scaladsl.server.Directives._ | |
| import akka.stream.ActorMaterializer | |
| import http.ActorPerRequest.RequestHandler.Handle | |
| import scala.io.StdIn | |
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
| import akka.actor.{Actor, ActorSystem, Props} | |
| import akka.cluster.Cluster | |
| import akka.cluster.ClusterEvent.{MemberEvent, ReachabilityEvent} | |
| import com.typesafe.config.ConfigFactory | |
| import scala.concurrent.Await | |
| import scala.concurrent.duration._ | |
| import scala.io.StdIn | |
| object WeaklyUp extends App { |
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 streams; | |
| import akka.actor.ActorSystem; | |
| import akka.stream.ActorMaterializer; | |
| import akka.stream.Materializer; | |
| import akka.stream.contrib.FileTailSource; | |
| import akka.stream.contrib.amqp.*; | |
| import akka.stream.javadsl.Framing; | |
| import akka.util.ByteString; | |
| import scala.concurrent.duration.FiniteDuration; |
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 streams; | |
| import akka.stream.Attributes; | |
| import akka.stream.Outlet; | |
| import akka.stream.SourceShape; | |
| import akka.stream.stage.AbstractOutHandler; | |
| import akka.stream.stage.GraphStage; | |
| import akka.stream.stage.GraphStageLogic; | |
| import akka.stream.stage.OutHandler; |