package scaladsl
- Alphabetic
- Public
- All
Type Members
-
abstract
class
GrpcServerLogic extends HttpServerLogic
- Annotations
- @ApiMayChange()
-
abstract
class
HttpServerLogic extends ServerStreamletLogic
cloudflow.akkastream.ServerStreamletLogic for accepting HTTP requests.
cloudflow.akkastream.ServerStreamletLogic for accepting HTTP requests. The HttpServerLogic requires a
Server
to be passed in when it is created. You need to pass in a Server to create it cloudflow.akkastream.AkkaServerStreamlet extends cloudflow.akkastream.Server, which can be used for this purpose. When you define the logic inside the streamlet, you can just pass inthis
:import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ object TestHttpServer extends AkkaServerStreamlet { implicit val jsonformatData: RootJsonFormat[Data] = jsonFormat2(Data.apply) val outlet = AvroOutlet[Data]("out", _.id.toString) val shape = StreamletShape(outlet) override def createLogic = new HttpServerLogic(this) { val writer = sinkRef(outlet) override def route(): Route = { put { entity(as[Data]) { data => if (data.id == 42) { onSuccess(writer.write(data)) { _ => complete(StatusCodes.OK) } } else complete(StatusCodes.BadRequest) } } } } }
-
class
MergeLogic[T] extends RunnableGraphStreamletLogic
A
MergeLogic
merges two or more inlets into one outlet.A
MergeLogic
merges two or more inlets into one outlet. Elements from all inlets will be processed with at-least-once semantics. The elements will be processed in semi-random order and with equal priority for all inlets.- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
Merger.source
instead.
-
abstract
class
SplitterLogic[I, L, R] extends RunnableGraphStreamletLogic
A StreamletLogic that splits elements based on a flow of type
FlowWithOffsetContext[I, Either[L, R]]
.A StreamletLogic that splits elements based on a flow of type
FlowWithOffsetContext[I, Either[L, R]]
.- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
Splitter.sink
instead.
Value Members
-
object
HttpServerLogic extends Serializable
Creates HttpServerLogics that can be used to write data to an outlet that has been received by PUT or POST requests.
-
object
Merger
Merges two or more sources, or inlets, of the same type, into one source.
-
object
Splitter
Provides functions to split elements based on a flow of type
FlowWithCommittableContext[I, Either[L, R]]
.