Add temporary interceptor support#182
Conversation
Codecov Report
@@ Coverage Diff @@
## master #182 +/- ##
=========================================
- Coverage 84.79% 84.39% -0.4%
=========================================
Files 56 58 +2
Lines 2756 2788 +32
=========================================
+ Hits 2337 2353 +16
- Misses 419 435 +16
Continue to review full report at Codecov.
|
|
@dwsupplee @jdpedrie @bshaffer if you have a chance, PTAL and let me know what you think. |
jdpedrie
left a comment
There was a problem hiding this comment.
in light of offline discussion, just a couple little things i noticed.
| $argument, | ||
| array $metadata, | ||
| array $options, | ||
| $continuation |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * | ||
| * @package Google\ApiCore\Transport\Grpc | ||
| */ | ||
| interface UnaryInterceptor |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
dwsupplee
left a comment
There was a problem hiding this comment.
Looks really good, just a few minor notes.
| use Google\ApiCore\GrpcSupportTrait; | ||
| use Google\ApiCore\ServerStream; | ||
| use Google\ApiCore\ServiceAddressTrait; | ||
| use Google\ApiCore\Transport\Grpc\GapicInterceptorInterface; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * | ||
| * @type array $stubOpts Options used to construct the gRPC stub. | ||
| * @type Channel $channel Grpc channel to be used. | ||
| * @type UnaryInterceptorInterface[] $interceptors *INTERNAL* Interceptor support, required until |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| ); | ||
| } | ||
|
|
||
| private function wrapExecuteWithInterceptor($execute, $interceptor) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Adds temporary support for an Interceptor-style interface in order to support logging of requests and responses via interceptors until interceptor support is available in gRPC.
This PR also adds a GapicInterceptor that can be used to implement common functionality such as metadata handling.