Skip to content

Instantly share code, notes, and snippets.

@jeroenr
Created December 4, 2019 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenr/4edc2b55685d3e7444b31a29965c1ca3 to your computer and use it in GitHub Desktop.
Save jeroenr/4edc2b55685d3e7444b31a29965c1ca3 to your computer and use it in GitHub Desktop.
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