Skip to content

Commit

Permalink
Bump pubsub to beta, mark batch as experimental (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpedrie authored Jun 30, 2017
1 parent 970a465 commit 9e355ff
Show file tree
Hide file tree
Showing 19 changed files with 129 additions and 44 deletions.
84 changes: 42 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ This client supports the following Google Cloud Platform services at a [Beta](#v

* [Google BigQuery](#google-bigquery-beta) (Beta)
* [Google Cloud Natural Language](#google-cloud-natural-language-beta) (Beta)
* [Google Cloud Pub/Sub](#google-cloud-pubsub-beta) (Beta)
* [Google Cloud Vision](#google-cloud-vision-beta) (Beta)

This client supports the following Google Cloud Platform services at an [Alpha](#versioning) quality level:
* [Google Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha)
* [Cloud Spanner](#cloud-spanner-alpha) (Alpha)
* [Google Cloud Speech](#google-cloud-speech-alpha) (Alpha)
* [Google Cloud Video Intelligence](#google-cloud-video-intelligence-alpha) (Alpha)
Expand Down Expand Up @@ -305,47 +305,7 @@ Google Cloud Natural Language can be installed separately by requiring the `goog
$ require google/cloud-language
```

## Google Cloud Vision (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/vision/visionclient)
- [Official Documentation](https://cloud.google.com/vision/docs)

#### Preview

```php
require 'vendor/autoload.php';

use Google\Cloud\Vision\VisionClient;

$vision = new VisionClient([
'projectId' => 'my_project'
]);

// Annotate an image, detecting faces.
$image = $vision->image(
fopen('/data/family_photo.jpg', 'r'),
['faces']
);

$annotation = $vision->annotate($image);

// Determine if the detected faces have headwear.
foreach ($annotation->faces() as $key => $face) {
if ($face->hasHeadwear()) {
echo "Face $key has headwear.\n";
}
}
```

#### google/cloud-vision

Google Cloud Vision can be installed separately by requiring the `google/cloud-vision` composer package:

```
$ require google/cloud-vision
```

## Google Cloud Pub/Sub (Alpha)
## Google Cloud Pub/Sub (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/pubsub/pubsubclient)
- [Official Documentation](https://cloud.google.com/pubsub/docs)
Expand Down Expand Up @@ -392,6 +352,46 @@ Google Cloud Pub/Sub can be installed separately by requiring the `google/cloud-
$ require google/cloud-pubsub
```

## Google Cloud Vision (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/vision/visionclient)
- [Official Documentation](https://cloud.google.com/vision/docs)

#### Preview

```php
require 'vendor/autoload.php';

use Google\Cloud\Vision\VisionClient;

$vision = new VisionClient([
'projectId' => 'my_project'
]);

// Annotate an image, detecting faces.
$image = $vision->image(
fopen('/data/family_photo.jpg', 'r'),
['faces']
);

$annotation = $vision->annotate($image);

// Determine if the detected faces have headwear.
foreach ($annotation->faces() as $key => $face) {
if ($face->hasHeadwear()) {
echo "Face $key has headwear.\n";
}
}
```

#### google/cloud-vision

Google Cloud Vision can be installed separately by requiring the `google/cloud-vision` composer package:

```
$ require google/cloud-vision
```

## Cloud Spanner (Alpha)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/spanner/spannerclient)
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/BatchConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* Hold configurations for the {@see \Google\Cloud\Core\Batch\BatchRunner}.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class BatchConfig
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/BatchDaemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
*
* The system test is responsible for testing this class.
* {@see \Google\Cloud\Tests\System\Core\Batch}
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class BatchDaemon
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/BatchJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* Represent batch jobs.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class BatchJob
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/BatchRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* A class for executing jobs in batch.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class BatchRunner
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/BatchTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* A trait to assist in the registering and processing of batch jobs.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
trait BatchTrait
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/ConfigStorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* An interface for storing the configuration.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
interface ConfigStorageInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/HandleFailureTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* A utility trait for handling failed items.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
trait HandleFailureTrait
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/InMemoryConfigStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* In-memory ConfigStorageInterface implementation.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
final class InMemoryConfigStorage implements
ConfigStorageInterface,
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/ProcessItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* An interface for processing the items.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
interface ProcessItemInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/Retry.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* A class for retrying the failed items.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class Retry
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/SysvConfigStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* ConfigStorageInterface implementation with SystemV IPC shared memory.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class SysvConfigStorage implements ConfigStorageInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/SysvProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* ProcessItemInterface implementation with SysV IPC message queue.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class SysvProcessor implements ProcessItemInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Batch/SysvTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

/**
* A utility trait related to System V IPC.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
trait SysvTrait
{
Expand Down
7 changes: 6 additions & 1 deletion src/Logging/LoggingClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ class LoggingClient
* BatchRunner.
* }
* @return PsrLogger
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
**/
public static function psrBatchLogger($name, array $options = [])
{
Expand Down Expand Up @@ -506,7 +510,8 @@ function (array $entry) {
* **Defaults to** ['batchSize' => 1000,
* 'callPeriod' => 2.0,
* 'workerNum' => 2]. Applies only when
* `batchEnabled` is set to `true`.
* `batchEnabled` is set to `true`. Note that this option is
* currently considered **experimental** and is subject to change.
* @type array $clientConfig Configuration options for the Logging client
* used to handle processing of batch items. For valid options
* please see
Expand Down
3 changes: 2 additions & 1 deletion src/Logging/PsrLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class PsrLogger implements LoggerInterface, \Serializable
* automatically chosen provider, based on detected environment
* settings.
* @type bool $batchEnabled Determines whether or not to use background
* batching. **Defaults to** `false`.
* batching. **Defaults to** `false`. Note that this option is
* currently considered **experimental** and is subject to change.
* @type bool $debugOutput Whether or not to output debug information.
* **Defaults to** false. Applies only when `batchEnabled` is set
* to `true`.
Expand Down
5 changes: 5 additions & 0 deletions src/PubSub/BatchPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
* 'data' => 'An important message.'
* ]);
* ```
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class BatchPublisher
{
Expand Down
4 changes: 4 additions & 0 deletions src/PubSub/Topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ public function publishBatch(array $messages, array $options = [])
* Example: `pubsub-topic-mytopic`.
* }
* @return BatchPublisher
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
public function batchPublisher(array $options = [])
{
Expand Down
5 changes: 5 additions & 0 deletions src/Trace/Reporter/AsyncReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
/**
* This implementation of the ReporterInterface use the BatchRunner to provide
* asynchronous reporting of Traces and their TraceSpans.
*
* @experimental The experimental flag means that while we believe this method
* or class is ready for use, it may change before release in backwards-
* incompatible ways. Please use with caution, and test thoroughly when
* upgrading.
*/
class AsyncReporter implements ReporterInterface
{
Expand Down

0 comments on commit 9e355ff

Please sign in to comment.