Skip to content

monix/monix-grpc

monix-grpc

Continuous Integration

A library to write grpc client and servers in Scala using Monix.

Design Goals

  • 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

Installation

sbt

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
    )
  )

Generator options

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.

Example projects:

Team

The current maintainers (people who can merge pull requests) are:

Credits

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages