Skip to content

Preparatory refactoring to add grpc-fallback support#201

Merged
michaelbausor merged 3 commits intogoogleapis:masterfrom
michaelbausor:grpc-fallback-preparation
Aug 8, 2018
Merged

Preparatory refactoring to add grpc-fallback support#201
michaelbausor merged 3 commits intogoogleapis:masterfrom
michaelbausor:grpc-fallback-preparation

Conversation

@michaelbausor
Copy link
Copy Markdown
Contributor

This PR is intended to prepare the ground for adding support for the grpc-fallback transport (serial protobuf over HTTP 1.1). It:

  • Adds ApiException::createFromRpcStatus
  • Refactors functionality from RestTransport into GuzzleTransportTrait
  • No behaviour changes

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 8, 2018

Codecov Report

Merging #201 into master will decrease coverage by 0.15%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
- Coverage   84.29%   84.14%   -0.16%     
==========================================
  Files          62       63       +1     
  Lines        2815     2826      +11     
==========================================
+ Hits         2373     2378       +5     
- Misses        442      448       +6
Impacted Files Coverage Δ
src/ApiCore/Transport/RestTransport.php 92.3% <100%> (+15.83%) ⬆️
src/ApiCore/ApiException.php 75% <28.57%> (-10.3%) ⬇️
src/ApiCore/Transport/HttpUnaryTransportTrait.php 38.09% <38.09%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9dd3911...2c29997. Read the comment docs.

/**
* An trait for shared functionality between Guzzle HTTP-based transports.
*/
trait GuzzleTransportTrait

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor

@dwsupplee dwsupplee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few minor nits.

* @return ApiException
*/
public static function createFromApiResponse($basicMessage, $rpcCode, $metadata = null)
public static function createFromApiResponse($basicMessage, $rpcCode, $metadata = null, $previous = null)

This comment was marked as spam.

use Google\Auth\HttpHandler\HttpHandlerFactory;

/**
* An trait for shared functionality between transports that support only unary RPCs using simple

This comment was marked as spam.

@michaelbausor michaelbausor merged commit 4097cbe into googleapis:master Aug 8, 2018
@michaelbausor michaelbausor deleted the grpc-fallback-preparation branch August 8, 2018 20:07
@michaelbausor michaelbausor mentioned this pull request Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants