Merge pull request #15854 from akka/wip-flow-optional-edges-patriknw
=str Sugar to make flows between vertices optional
This commit is contained in:
commit
8eb00dea91
4 changed files with 51 additions and 3 deletions
|
|
@ -204,5 +204,25 @@ class FlowGraphCompileSpec extends AkkaSpec {
|
|||
}.run()
|
||||
}
|
||||
|
||||
"make it optional to specify flows" in {
|
||||
FlowGraph { implicit b ⇒
|
||||
val merge = Merge[String]
|
||||
val bcast = Broadcast[String]
|
||||
import FlowGraphImplicits._
|
||||
in1 ~> merge ~> bcast ~> out1
|
||||
in2 ~> merge
|
||||
bcast ~> out2
|
||||
}.run()
|
||||
}
|
||||
|
||||
"use FlowWithSource and FlowWithSink" in {
|
||||
FlowGraph { implicit b ⇒
|
||||
val bcast = Broadcast[String]
|
||||
import FlowGraphImplicits._
|
||||
f1.withSource(in1) ~> bcast ~> f2.withSink(out1)
|
||||
bcast ~> f3.withSink(out2)
|
||||
}.run()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue