Skip to content

Commit

Permalink
feat: Add support for apiEndpoint and deprecate serviceAddress… (#2218)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and jdpedrie committed Aug 7, 2019
1 parent 2b7a95c commit 4178c50
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 5 additions & 2 deletions PubSub/src/V1/Gapic/PublisherGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/publisher_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/publisher_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/publisher_grpc_config.json',
Expand Down Expand Up @@ -248,6 +248,9 @@ public static function parseName($formattedName, $template = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'pubsub.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -275,7 +278,7 @@ public static function parseName($formattedName, $template = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
7 changes: 5 additions & 2 deletions PubSub/src/V1/Gapic/SubscriberGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private static function getClientDefaults()
{
return [
'serviceName' => self::SERVICE_NAME,
'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT,
'clientConfig' => __DIR__.'/../resources/subscriber_client_config.json',
'descriptorsConfigPath' => __DIR__.'/../resources/subscriber_descriptor_config.php',
'gcpApiConfigPath' => __DIR__.'/../resources/subscriber_grpc_config.json',
Expand Down Expand Up @@ -323,6 +323,9 @@ public static function parseName($formattedName, $template = null)
* Optional. Options for configuring the service API wrapper.
*
* @type string $serviceAddress
* **Deprecated**. This option will be removed in a future major release. Please
* utilize the `$apiEndpoint` option instead.
* @type string $apiEndpoint
* The address of the API remote host. May optionally include the port, formatted
* as "<uri>:<port>". Default 'pubsub.googleapis.com:443'.
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
Expand Down Expand Up @@ -350,7 +353,7 @@ public static function parseName($formattedName, $template = null)
* or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
* *Advanced usage*: Additionally, it is possible to pass in an already instantiated
* {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this
* object is provided, any settings in $transportConfig, and any $serviceAddress
* object is provided, any settings in $transportConfig, and any `$apiEndpoint`
* setting, will be ignored.
* @type array $transportConfig
* Configuration options that will be used to construct the transport. Options for
Expand Down
6 changes: 3 additions & 3 deletions PubSub/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updateTime": "2019-08-03T10:01:38.517982Z",
"updateTime": "2019-08-07T18:03:13.461076Z",
"sources": [
{
"generator": {
Expand All @@ -12,8 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "7b212a8d2319cd81a7b6942c25dbf4550480a06c",
"internalRef": "261339454"
"sha": "3a1b46a6668194a527e532a2c355b404c79b0e6a",
"internalRef": "262167956"
}
}
],
Expand Down

0 comments on commit 4178c50

Please sign in to comment.