Created
December 4, 2019 13:53
-
-
Save jeroenr/4edc2b55685d3e7444b31a29965c1ca3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.jeroenr.rain.radar | |
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ | |
import cloudflow.akkastream._ | |
import cloudflow.akkastream.util.scaladsl._ | |
import cloudflow.streamlets._ | |
import cloudflow.streamlets.avro._ | |
import com.github.jeroenr.rain.radar.PrecipitationDataJsonSupport._ | |
class PrecipitationDataHttpIngress extends AkkaServerStreamlet { | |
val out = AvroOutlet[PrecipitationData]("out").withPartitioner(_.location.city) | |
def shape = StreamletShape.withOutlets(out) | |
override def createLogic = HttpServerLogic.default(this, out) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment