!str #16992 Rework Source and Sink name parameter
* Remove name parameter (no overloads), naming is performed using `.withAttributes` or the new convenience `.named`. Those adds the OperationAttribute.Name and also change the name of the shape Inlet and Outlet. * Remove Source/Sink parameter list for 0 parameter methods, this allows usage of `Sink.head` instead of `Sink.head()`
This commit is contained in:
parent
53e3dcad06
commit
3dc4e6d077
75 changed files with 336 additions and 364 deletions
|
|
@ -152,14 +152,14 @@ class FlowDocSpec extends AkkaSpec {
|
|||
|
||||
//#flow-mat-combine
|
||||
// An empty source that can be shut down explicitly from the outside
|
||||
val source: Source[Int, Promise[Unit]] = Source.lazyEmpty[Int]()
|
||||
val source: Source[Int, Promise[Unit]] = Source.lazyEmpty[Int]
|
||||
|
||||
// A flow that internally throttles elements to 1/second, and returns a Cancellable
|
||||
// which can be used to shut down the stream
|
||||
val flow: Flow[Int, Int, Cancellable] = throttler
|
||||
|
||||
// A sink that returns the first element of a stream in the returned Future
|
||||
val sink: Sink[Int, Future[Int]] = Sink.head[Int]()
|
||||
val sink: Sink[Int, Future[Int]] = Sink.head[Int]
|
||||
|
||||
// By default, the materialized value of the leftmost stage is preserved
|
||||
val r1: RunnableFlow[Promise[Unit]] = source.via(flow).to(sink)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue