Add support to enable grpc_call_invoker#207
Conversation
| 'serviceName' => 'test.interface.v1.api', | ||
| 'clientConfig' => __DIR__ . '/testdata/test_service_client_config.json', | ||
| 'descriptorsConfigPath' => __DIR__.'/testdata/test_service_descriptor_config.php', | ||
| 'gcpApiConfigPath' => __DIR__.'/../testdata/test_service_grpc_config.json', |
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.
src/ApiCore/GapicClientTrait.php
Outdated
| if (isset($options['gcpApiConfigPath']) | ||
| && file_exists($options['gcpApiConfigPath']) | ||
| && isset($options['serviceAddress'])) { | ||
| $grpcGcpConfig = initGrpcGcpConfig( |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 'serviceName' => 'test.interface.v1.api', | ||
| 'clientConfig' => __DIR__ . '/testdata/test_service_client_config.json', | ||
| 'descriptorsConfigPath' => __DIR__.'/testdata/test_service_descriptor_config.php', | ||
| 'gcpApiConfigPath' => __DIR__.'/../testdata/test_service_grpc_config.json', |
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.
composer.json
Outdated
| "php": ">=5.5", | ||
| "google/auth": "^1.2.0", | ||
| "google/gpc-gcp": "^0.1.0", | ||
| "google/grpc-gcp": "^0.1.0", |
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.
src/ApiCore/GapicClientTrait.php
Outdated
| 'rest' => [], | ||
| ]; | ||
|
|
||
| if (isset($defaultOptions['gcpApiConfigPath']) |
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.
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #207 +/- ##
=========================================
- Coverage 84.81% 84.61% -0.2%
=========================================
Files 62 63 +1
Lines 2838 2373 -465
=========================================
- Hits 2407 2008 -399
+ Misses 431 365 -66
Continue to review full report at Codecov.
|
dwsupplee
left a comment
There was a problem hiding this comment.
Thanks so much for this @WeiranFang :). Just a few minor style nits on my end, otherwise looks great.
src/ApiCore/GapicClientTrait.php
Outdated
| $options['transportConfig']['grpc'] += $defaultOptions['transportConfig']['grpc']; | ||
| $options['transportConfig']['rest'] += $defaultOptions['transportConfig']['rest']; | ||
|
|
||
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.
| { | ||
| $apiConfig = new ApiConfig(); | ||
| $apiConfig->mergeFromJsonString( | ||
| file_get_contents(__DIR__.'/testdata/test_service_grpc_config.json')); |
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.
src/ApiCore/GapicClientTrait.php
Outdated
| $this->modifyClientOptions($options); | ||
|
|
||
| if (isset($options['gcpApiConfigPath']) |
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.
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.
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.
Per discussion in googleapis/google-cloud-php#1146, this PR is to move the logic of enabling channel management to gax library. Another part of the changes resides in gapic-generator library: googleapis/gapic-generator#2231