mu-grpc-common 0.3.0.0 → 0.4.0.0
raw patch · 2 files changed
+21/−12 lines, 2 filesdep ~avrodep ~binarydep ~bytestringnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: avro, binary, bytestring, http2-grpc-proto3-wire, http2-grpc-types, mu-avro, mu-protobuf, mu-rpc, mu-schema
API changes (from Hackage documentation)
Files
- mu-grpc-common.cabal +10/−10
- src/Mu/GRpc/Avro.hs +11/−2
mu-grpc-common.cabal view
@@ -1,5 +1,5 @@ name: mu-grpc-common-version: 0.3.0.0+version: 0.4.0.0 synopsis: gRPC for Mu, common modules for client and server description: Use @mu-grpc-server@ or @mu-grpc-client@ (the common parts).@@ -25,16 +25,16 @@ Mu.GRpc.Bridge build-depends:- avro >=0.5+ avro >=0.5.1 && <0.6 , base >=4.12 && <5- , binary- , bytestring- , http2-grpc-proto3-wire- , http2-grpc-types- , mu-avro >=0.3.0- , mu-protobuf >=0.3.0- , mu-rpc >=0.3.0- , mu-schema >=0.3.0+ , binary >=0.8 && <0.9+ , bytestring >=0.10 && <0.11+ , http2-grpc-proto3-wire >=0.1 && <0.2+ , http2-grpc-types >=0.5 && <0.6+ , mu-avro ==0.4.*+ , mu-protobuf ==0.4.*+ , mu-rpc ==0.4.*+ , mu-schema ==0.3.* hs-source-dirs: src default-language: Haskell2010
src/Mu/GRpc/Avro.hs view
@@ -66,12 +66,21 @@ = ViaToAvroTypeRef { unViaToAvroTypeRef :: t } instance GRPCInput AvroRPC () where- encodeInput _ _ () = mempty+ encodeInput _ c () = encodeEmpty c decodeInput _ _ = runGetIncremental $ pure $ Right () instance GRPCOutput AvroRPC () where- encodeOutput _ _ () = mempty+ encodeOutput _ c () = encodeEmpty c decodeOutput _ _ = runGetIncremental $ pure $ Right ()++encodeEmpty :: Compression -> Builder+encodeEmpty compression =+ mconcat [ singleton (if _compressionByteSet compression then 1 else 0)+ , putWord32be (fromIntegral $ ByteString.length bin)+ , fromByteString bin+ ]+ where+ bin = _compressionFunction compression "" instance forall (sch :: Schema') (sty :: Symbol) (i :: Type). ( HasAvroSchema (WithSchema sch sty i)