A library to write grpc client and servers in Scala using Monix.
- Support all unary and streaming flavors of grpc calls
- Provide nimble and fast Monix building blocks on top of
grpc-java
- Implement efficient cancellation, buffering and back-pressure out-of-the-box
- Embrace and extend
grpc-java
's' API safely and idiomatically instead of creating a new API
Add the following to your project/plugins.sbt
:
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.4")
libraryDependencies +=
"me.vican.jorge" %% "monix-grpc-codegen" % "0.0.0+46-e1776191"
Add the following to your build.sbt
:
lazy val root = project
.settings(
Compile / PB.targets := Seq(
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value / "scalapb",
monix.grpc.codegen.GrpcCodeGenerator -> (Compile / sourceManaged).value / "scalapb"
),
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty" % "1.39.0",
"com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapb.compiler.Version.scalapbVersion
)
)
Options can be set like:
monix.grpc.codegen.GrpcCodeGenerator(serviceSuffix = "MySuffix") -> (Compile / sourceManaged).value / "scalapb"
The current options are:
serviceSuffix
: sets the suffix of the generated service name, the default isApi
.
The current maintainers (people who can merge pull requests) are:
- Jorge Vicente Cantero - @jvican
- Boris Smidt - @borissmidt
- Powered by ScalaPB and grpc/grpc-java.
- Inspired by salesforce/reactive-grpc, typelevel/fs2-grpc and scalapb/zio-grpc among others.