Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/grpc transcoding #1834

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c94b8f5
feat: support grpc http transcoding
WayneWang12 Jun 28, 2022
5388d51
use new proto API
GreyPlane Sep 22, 2023
7e2b0de
explicitly annotate type for HttpApi.serve
GreyPlane Sep 22, 2023
fe20925
recover from parsing proto method that doesn't contain http extension
GreyPlane Sep 22, 2023
5e07e8b
mark HttpApi.serve as ApiMayChange
GreyPlane Sep 22, 2023
e1a288c
narrow exception type
GreyPlane Sep 23, 2023
8a9702a
code cleanup
GreyPlane Sep 23, 2023
69a6e4c
remove deprecated overloading for HttpMethod.custom
GreyPlane Sep 23, 2023
7d49930
format code
GreyPlane Sep 23, 2023
b226bee
conditional generate httpHandler for server handler
GreyPlane Sep 23, 2023
340a35e
fix typo
GreyPlane Sep 23, 2023
c0a298f
improve API to make it less intrusive
GreyPlane Sep 23, 2023
a264cb3
refine API signature and description
GreyPlane Sep 23, 2023
ebb03b7
improve error handling
GreyPlane Sep 23, 2023
9b85dfb
reorganize APIs in order to support both javadsl and scaladsl
GreyPlane Sep 24, 2023
d45c0c1
use scalapb generated classes
GreyPlane Sep 25, 2023
40efab1
add basic test
GreyPlane Sep 25, 2023
38c8367
fix typo
GreyPlane Sep 27, 2023
c63b5c6
fix wrong proto package
GreyPlane Sep 27, 2023
88af2fe
using akka grpc interface for javadsl
GreyPlane Sep 27, 2023
9f709ec
add comment to indicate potential inconvience introduced by proto-jso…
GreyPlane Sep 27, 2023
57ddff9
reorganizing files to simplify implementation
GreyPlane Sep 27, 2023
a9cb820
use both scalaDescriptor and javaDescriptor for construct HttpHandler
GreyPlane Oct 1, 2023
1bc6f85
add javadsl tester test
GreyPlane Oct 1, 2023
99af29b
hand write json format for ser/deser proto
GreyPlane Oct 1, 2023
6d65d5d
add convenient methods to create handler
GreyPlane Oct 1, 2023
3904f92
cleanup
GreyPlane Oct 1, 2023
49ab068
print after server running
GreyPlane Oct 1, 2023
b7e76cc
cleanup code
GreyPlane Oct 1, 2023
32a2971
improve comment
GreyPlane Oct 1, 2023
f566dd3
use AkkaHttpClientUtils to handle gRPC response error correctly
GreyPlane Oct 2, 2023
3d7ec28
improve error mapping
GreyPlane Oct 2, 2023
19d2a01
refactoring code
GreyPlane Oct 2, 2023
8600697
retrieve trailer from attributes for Strict HttpEntity
GreyPlane Oct 2, 2023
1f4a52d
add basic API test
GreyPlane Oct 3, 2023
89f10d1
replace scala parser combinator with parboiled2
GreyPlane Oct 3, 2023
c5322c0
rename test
GreyPlane Oct 3, 2023
829fbd2
replace costly regular expression with akka-http PathMatcher
GreyPlane Oct 4, 2023
7b4494f
add matcher test case for matching complex variable pattern
GreyPlane Oct 10, 2023
369ac39
support path like selector for path variable
GreyPlane Oct 10, 2023
2a38a7d
add headers
GreyPlane Oct 13, 2023
43c105f
fix typo
GreyPlane Oct 13, 2023
c29b0c0
refactor complexSelectorBuilder
GreyPlane Oct 13, 2023
f90c232
add more gRPC status to HTTP status mapping
GreyPlane Oct 13, 2023
8f69a14
fix 2.13 build issues
GreyPlane Oct 13, 2023
d281040
fix 3 build issues
GreyPlane Oct 13, 2023
79d6df0
fix 2.13 build issues
GreyPlane Oct 13, 2023
e6a64d0
fix gradle building issues for plugin-tester-java
GreyPlane Oct 15, 2023
2b083d7
fix maven building issues for plugin-tester-scala
GreyPlane Oct 26, 2023
6617462
bump: grpc 1.58.0 (#1856)
patriknw Oct 17, 2023
783255d
bump: Akka 2.9.0 (#1863)
patriknw Oct 24, 2023
59b632e
docs: gradle config that works from quickstarts (#1867)
johanandren Oct 25, 2023
1d1d772
bump accidentally changed dependency version
GreyPlane Oct 26, 2023
63bf370
fix: gradle plugin was missing scalaPB generated files from library p…
GreyPlane Feb 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
explicitly annotate type for HttpApi.serve
GreyPlane committed Feb 19, 2024
commit 7e2b0deaeb5261491546b24e2f0c0955e49b0da7
4 changes: 2 additions & 2 deletions runtime/src/main/scala/akka/grpc/HttpApi.scala
Original file line number Diff line number Diff line change
@@ -161,8 +161,8 @@ object HttpApi {

def serve(fileDescriptor: FileDescriptor, handler: (HttpRequest, String) => Future[HttpResponse])(
implicit mat: Materializer,
ec: ExecutionContext) = {
val handlers = for {
ec: ExecutionContext): PartialFunction[HttpRequest, Future[HttpResponse]] = {
val handlers: scala.collection.mutable.Buffer[HttpHandler] = for {
service <- fileDescriptor.getServices.asScala
method <- service.getMethods.asScala
rules = getRules(method)