-
Notifications
You must be signed in to change notification settings - Fork 124
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
Adding support for custom headers #577 #838
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0ff5b44
Adding support for custom headers #577
drmontgomery 5be91c5
Fixed compilation error on scala 2.13.1.
drmontgomery a83d909
Fixed import statements in sbt-plugin.
drmontgomery 48ced47
Added copyright notices.
drmontgomery a0f2c4b
Fixed broken import in sbt-plugin interop test.
drmontgomery 2ebe910
Restored akka.grpc.GrpcServiceException.
drmontgomery f897dba
Restored missing require check.
drmontgomery 7cf9871
Added copyright.
drmontgomery 7c45e34
Updated based on review feedback.
drmontgomery ec63629
Replaced list of http headers with map of metadata entries.
drmontgomery aafd784
Replaced GrpcErrorResponse with Trailers.
drmontgomery 0ff8f0c
Modified GrpcMetadataImpl.map to take better advantage of underlying …
drmontgomery e2f7ca4
Added exclusions for binary incompatibilities.
drmontgomery File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
runtime/src/main/mima-filters/0.7.3.backwards.excludes/838-custom-headers.backwards.excludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Replaced javadsl.MetadataImpl with internal.JavaMetadataImpl adapter. | ||
ProblemFilters.exclude[MissingClassProblem]("akka.grpc.javadsl.MetadataImpl") | ||
|
||
# Replaced scaladsl.MetadataImpl with internal.HeaderMetadataImpl. | ||
ProblemFilters.exclude[MissingClassProblem]("akka.grpc.scaladsl.MetadataImpl") | ||
ProblemFilters.exclude[MissingClassProblem]("akka.grpc.scaladsl.MetadataImpl$") | ||
|
||
# Modified GrpcExceptionHandler to return Trailers instead of io.grpc.Status. | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.javadsl.GrpcExceptionHandler.standard") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.javadsl.GrpcExceptionHandler.default") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.javadsl.GrpcExceptionHandler.defaultMapper") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.status") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcExceptionHandler.default") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcExceptionHandler.defaultMapper") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcMarshalling.marshal") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcMarshalling.marshal$default$2") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcMarshalling.marshalStream") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.scaladsl.GrpcMarshalling.marshalStream$default$2") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.internal.GrpcResponseHelpers.status") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.internal.GrpcResponseHelpers.apply") | ||
ProblemFilters.exclude[IncompatibleSignatureProblem]("akka.grpc.internal.GrpcResponseHelpers.apply$default$3") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.internal.GrpcResponseHelpers.status") | ||
|
||
# Added methods to iterate metadata entries to javadsl.Metadata interface. | ||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.grpc.javadsl.Metadata.asMap") | ||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.grpc.javadsl.Metadata.asList") | ||
|
||
# Added javadsl.Metadata.asScala method. | ||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.grpc.javadsl.Metadata.asScala") | ||
|
||
# Added scaladsl.Metadata.asList method. | ||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.grpc.scaladsl.Metadata.asList") | ||
|
||
# Moved exception handler conversion inside javadsl.GrpcMarshalling. | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshal") | ||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshal$default$6") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshalStream") | ||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshalStream$default$6") | ||
ProblemFilters.exclude[IncompatibleResultTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshalStream$default$6") | ||
ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.grpc.javadsl.GrpcMarshalling.marshalStream") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2018-2020 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
|
||
package akka.grpc | ||
|
||
import io.grpc.Status | ||
import akka.grpc.internal.JavaMetadataImpl | ||
import akka.grpc.scaladsl.{ Metadata, MetadataBuilder } | ||
import akka.grpc.javadsl.{ Metadata => jMetadata } | ||
|
||
case class Trailers(status: Status, metadata: Metadata) { | ||
def this(status: Status) { | ||
this(status, MetadataBuilder.empty) | ||
} | ||
|
||
def this(status: Status, metadata: jMetadata) { | ||
this(status, metadata.asScala) | ||
} | ||
|
||
/** | ||
* Java API: Returns the status. | ||
*/ | ||
def getStatus: Status = | ||
status | ||
|
||
/** | ||
* Java API: Returns the trailing metadata. | ||
*/ | ||
def getMetadata: jMetadata = | ||
new JavaMetadataImpl(metadata) | ||
} | ||
|
||
object Trailers { | ||
def apply(status: Status): Trailers = new Trailers(status) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can even use wildcards here but this is 👍