akka.grpc.Codec.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of akka-grpc-runtime_2.12 Show documentation
Show all versions of akka-grpc-runtime_2.12 Show documentation
Akka gRPC - Support for building streaming gRPC servers and clients on top of Akka Streams.
/*
* Copyright (C) 2018 Lightbend Inc.
*/
package akka.grpc
import akka.util.ByteString
// TODO we could also try to use akka.http.scaladsl.coding, but that might be overkill since that is geared
// towards streaming use cases, and we need to compress each message separately.
abstract class Codec {
val name: String
def compress(bytes: ByteString): ByteString
def uncompress(bytes: ByteString): ByteString
}