A library to write grpc client and servers in Scala using Monix.
grpc-java
grpc-java
's' API safely and idiomatically instead of creating a new APIAdd 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 is Api
.The current maintainers (people who can merge pull requests) are: