doc Replace the word stage by operator in stream doc (#25138)
This commit is contained in:
parent
1919f222fa
commit
a17a61557c
142 changed files with 341 additions and 341 deletions
|
|
@ -287,14 +287,14 @@ class GraphStageDocSpec extends AkkaSpec {
|
|||
"Demonstrate chaining of graph stages" in {
|
||||
val sink = Sink.fold[List[Int], Int](List.empty[Int])((acc, n) ⇒ acc :+ n)
|
||||
|
||||
//#graph-stage-chain
|
||||
//#graph-operator-chain
|
||||
val resultFuture = Source(1 to 5)
|
||||
.via(new Filter(_ % 2 == 0))
|
||||
.via(new Duplicator())
|
||||
.via(new Map(_ / 2))
|
||||
.runWith(sink)
|
||||
|
||||
//#graph-stage-chain
|
||||
//#graph-operator-chain
|
||||
|
||||
Await.result(resultFuture, 3.seconds) should ===(List(1, 1, 2, 2))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
|
|||
implicit val materializer = ActorMaterializer()
|
||||
implicit val ec = system.dispatcher
|
||||
|
||||
//#stage-with-logging
|
||||
//#operator-with-logging
|
||||
import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler, StageLogging }
|
||||
|
||||
final class RandomLettersSource extends GraphStage[SourceShape[String]] {
|
||||
|
|
@ -39,7 +39,7 @@ class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
|
|||
def nextChar(): Char =
|
||||
ThreadLocalRandom.current().nextInt('a', 'z'.toInt + 1).toChar
|
||||
}
|
||||
//#stage-with-logging
|
||||
//#operator-with-logging
|
||||
|
||||
"demonstrate logging in custom graphstage" in {
|
||||
val n = 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue