Rename start/endContextPropagation functions to asFlow/Source.. (#26353)

To match FlowWithContext.asFlow
This commit is contained in:
Luc Bourlier 2019-03-04 15:48:24 +01:00 committed by Patrik Nordwall
parent ff9289a089
commit 5a425c1dc7
10 changed files with 49 additions and 43 deletions

View file

@ -1,4 +1,4 @@
# Source.startContextPropagation
# Source.asSourceWithContext
Turns a Source into a SourceWithContext which can propagate a context per element along a stream.
@ -8,11 +8,11 @@ Turns a Source into a SourceWithContext which can propagate a context per elemen
## Signature
@@signature [Source.scala](/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala) { #startContextPropagation }
@@signature [Source.scala](/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala) { #asSourceWithContext }
@@@
## Description
Turns a Source into a SourceWithContext which can propagate a context per element along a stream.
The function passed into startContextPropagation must turn elements into contexts, one context for every element.
The function passed into asSourceWithContext must turn elements into contexts, one context for every element.

View file

@ -8,6 +8,7 @@ These built-in sources are available from @scala[`akka.stream.scaladsl.Source`]
| |Operator|Description|
|--|--|--|
|Source|<a name="actorref"></a>@ref[actorRef](Source/actorRef.md)|Materialize an `ActorRef`; sending messages to it will emit them on the stream.|
|Source|<a name="assourcewithcontext"></a>@ref[asSourceWithContext](Source/asSourceWithContext.md)|Turns a Source into a SourceWithContext which can propagate a context per element along a stream.|
|Source|<a name="assubscriber"></a>@ref[asSubscriber](Source/asSubscriber.md)|Integration with Reactive Streams, materializes into a `org.reactivestreams.Subscriber`.|
|Source|<a name="combine"></a>@ref[combine](Source/combine.md)|Combine several sources, using a given strategy such as merge or concat, into one source.|
|Source|<a name="cycle"></a>@ref[cycle](Source/cycle.md)|Stream iterator in cycled manner.|
@ -27,7 +28,6 @@ These built-in sources are available from @scala[`akka.stream.scaladsl.Source`]
|Source|<a name="range"></a>@ref[range](Source/range.md)|Emit each integer in a range, with an option to take bigger steps than 1.|
|Source|<a name="repeat"></a>@ref[repeat](Source/repeat.md)|Stream a single object repeatedly|
|Source|<a name="single"></a>@ref[single](Source/single.md)|Stream a single object|
|Source|<a name="startcontextpropagation"></a>@ref[startContextPropagation](Source/startContextPropagation.md)|Turns a Source into a SourceWithContext which can propagate a context per element along a stream.|
|Source|<a name="tick"></a>@ref[tick](Source/tick.md)|A periodical repetition of an arbitrary object.|
|Source|<a name="unfold"></a>@ref[unfold](Source/unfold.md)|Stream the result of a function as long as it returns a @scala[`Some`] @java[`Optional`].|
|Source|<a name="unfoldasync"></a>@ref[unfoldAsync](Source/unfoldAsync.md)|Just like `unfold` but the fold function returns a @scala[`Future`] @java[`CompletionStage`].|
@ -286,7 +286,7 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md)
@@@ index
* [combine](Source/combine.md)
* [startContextPropagation](Source/startContextPropagation.md)
* [asSourceWithContext](Source/asSourceWithContext.md)
* [fromPublisher](Source/fromPublisher.md)
* [fromIterator](Source/fromIterator.md)
* [cycle](Source/cycle.md)