Skip to content

Commit c9d410d

Browse files
datastore | logging: promote to GA
1 parent 7ed4291 commit c9d410d

3 files changed

Lines changed: 101 additions & 101 deletions

File tree

README.md

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
This client supports the following Google Cloud Platform services at a [General Availability (GA)](#versioning) quality level:
1414

15+
* [Cloud Datastore](#cloud-datastore-ga) (GA)
1516
* [Cloud Storage](#cloud-storage-ga) (GA)
17+
* [Google Stackdriver Logging](#google-stackdriver-logging-ga) (GA)
1618

1719
This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:
1820

19-
* [Cloud Datastore](#cloud-datastore-beta) (Beta)
2021
* [Cloud Natural Language](#cloud-natural-language-beta) (Beta)
2122
* [Cloud Translation API](#cloud-translation-api-beta) (Beta)
2223
* [Cloud Vision](#cloud-vision-beta) (Beta)
2324
* [Google BigQuery](#google-bigquery-beta) (Beta)
24-
* [Google Stackdriver Logging](#google-stackdriver-logging-beta) (Beta)
2525

2626
This client supports the following Google Cloud Platform services at an [Alpha](#versioning) quality level:
2727

@@ -153,6 +153,69 @@ var gcloud = require('google-cloud')({
153153
You can also set auth on a per-API-instance basis. The examples below show you how.
154154

155155

156+
## Cloud Datastore (GA)
157+
158+
- [API Documentation][gcloud-datastore-docs]
159+
- [Official Documentation][cloud-datastore-docs]
160+
161+
*Follow the [activation instructions][cloud-datastore-activation] to use the Cloud Datastore API with your project.*
162+
163+
#### Using the Cloud Datastore API module
164+
165+
```
166+
$ npm install --save @google-cloud/datastore
167+
```
168+
169+
```js
170+
var datastore = require('@google-cloud/datastore');
171+
```
172+
173+
#### Preview
174+
175+
```js
176+
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
177+
// global basis (see Authentication section above).
178+
179+
var datastoreClient = datastore({
180+
projectId: 'grape-spaceship-123',
181+
keyFilename: '/path/to/keyfile.json'
182+
});
183+
184+
var key = datastoreClient.key(['Product', 'Computer']);
185+
186+
datastoreClient.get(key, function(err, entity) {
187+
console.log(err || entity);
188+
});
189+
190+
// Save data to Datastore.
191+
var blogPostData = {
192+
title: 'How to make the perfect homemade pasta',
193+
author: 'Andrew Chilton',
194+
isDraft: true
195+
};
196+
197+
var blogPostKey = datastoreClient.key('BlogPost');
198+
199+
datastoreClient.save({
200+
key: blogPostKey,
201+
data: blogPostData
202+
}, function(err) {
203+
// `blogPostKey` has been updated with an ID so you can do more operations
204+
// with it, such as an update.
205+
blogPostData.isDraft = false;
206+
207+
datastoreClient.save({
208+
key: blogPostKey,
209+
data: blogPostData
210+
}, function(err) {
211+
if (!err) {
212+
// The blog post is now published!
213+
}
214+
});
215+
});
216+
```
217+
218+
156219
## Cloud Storage (GA)
157220

158221
- [API Documentation][gcloud-storage-docs]
@@ -214,65 +277,63 @@ localReadStream.pipe(remoteWriteStream);
214277
```
215278

216279

217-
## Cloud Datastore (Beta)
218-
219-
- [API Documentation][gcloud-datastore-docs]
220-
- [Official Documentation][cloud-datastore-docs]
280+
## Google Stackdriver Logging (Beta)
221281

222-
*Follow the [activation instructions][cloud-datastore-activation] to use the Cloud Datastore API with your project.*
282+
- [API Documentation][gcloud-logging-docs]
283+
- [Official Documentation][cloud-logging-docs]
223284

224-
#### Using the Cloud Datastore API module
285+
#### Using the Google Stackdriver Logging API module
225286

226287
```
227-
$ npm install --save @google-cloud/datastore
288+
$ npm install --save @google-cloud/logging
228289
```
229290

230291
```js
231-
var datastore = require('@google-cloud/datastore');
292+
var logging = require('@google-cloud/logging');
232293
```
233294

234295
#### Preview
235296

236297
```js
237-
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
238-
// global basis (see Authentication section above).
298+
// Authenticating on a global-basis. You can also authenticate on a per-API-
299+
// basis (see Authentication section above).
239300

240-
var datastoreClient = datastore({
301+
var loggingClient = logging({
241302
projectId: 'grape-spaceship-123',
242303
keyFilename: '/path/to/keyfile.json'
243304
});
244305

245-
var key = datastoreClient.key(['Product', 'Computer']);
306+
// Create a sink using a Bucket as a destination.
307+
var gcs = storage();
246308

247-
datastoreClient.get(key, function(err, entity) {
248-
console.log(err || entity);
249-
});
309+
loggingClient.createSink('my-new-sink', {
310+
destination: gcs.bucket('my-sink')
311+
}, function(err, sink) {});
250312

251-
// Save data to Datastore.
252-
var blogPostData = {
253-
title: 'How to make the perfect homemade pasta',
254-
author: 'Andrew Chilton',
255-
isDraft: true
313+
// Write a critical entry to a log.
314+
var syslog = loggingClient.log('syslog');
315+
316+
var metadata = {
317+
resource: {
318+
type: 'gce_instance',
319+
labels: {
320+
zone: 'global',
321+
instance_id: '3'
322+
}
323+
}
256324
};
257325

258-
var blogPostKey = datastoreClient.key('BlogPost');
326+
var entry = syslog.entry(metadata, {
327+
delegate: process.env.user
328+
});
259329

260-
datastoreClient.save({
261-
key: blogPostKey,
262-
data: blogPostData
263-
}, function(err) {
264-
// `blogPostKey` has been updated with an ID so you can do more operations
265-
// with it, such as an update.
266-
blogPostData.isDraft = false;
330+
syslog.critical(entry, function(err) {});
267331

268-
datastoreClient.save({
269-
key: blogPostKey,
270-
data: blogPostData
271-
}, function(err) {
272-
if (!err) {
273-
// The blog post is now published!
274-
}
275-
});
332+
// Get all entries in your project.
333+
loggingClient.getEntries(function(err, entries) {
334+
if (!err) {
335+
// `entries` contains all of the entries from the logs in your project.
336+
}
276337
});
277338
```
278339

@@ -629,67 +690,6 @@ job.getQueryResults().on('data', function(row) {});
629690
```
630691

631692

632-
## Google Stackdriver Logging (Beta)
633-
634-
- [API Documentation][gcloud-logging-docs]
635-
- [Official Documentation][cloud-logging-docs]
636-
637-
#### Using the Google Stackdriver Logging API module
638-
639-
```
640-
$ npm install --save @google-cloud/logging
641-
```
642-
643-
```js
644-
var logging = require('@google-cloud/logging');
645-
```
646-
647-
#### Preview
648-
649-
```js
650-
// Authenticating on a global-basis. You can also authenticate on a per-API-
651-
// basis (see Authentication section above).
652-
653-
var loggingClient = logging({
654-
projectId: 'grape-spaceship-123',
655-
keyFilename: '/path/to/keyfile.json'
656-
});
657-
658-
// Create a sink using a Bucket as a destination.
659-
var gcs = storage();
660-
661-
loggingClient.createSink('my-new-sink', {
662-
destination: gcs.bucket('my-sink')
663-
}, function(err, sink) {});
664-
665-
// Write a critical entry to a log.
666-
var syslog = loggingClient.log('syslog');
667-
668-
var metadata = {
669-
resource: {
670-
type: 'gce_instance',
671-
labels: {
672-
zone: 'global',
673-
instance_id: '3'
674-
}
675-
}
676-
};
677-
678-
var entry = syslog.entry(metadata, {
679-
delegate: process.env.user
680-
});
681-
682-
syslog.critical(entry, function(err) {});
683-
684-
// Get all entries in your project.
685-
loggingClient.getEntries(function(err, entries) {
686-
if (!err) {
687-
// `entries` contains all of the entries from the logs in your project.
688-
}
689-
});
690-
```
691-
692-
693693
## Cloud Bigtable (Alpha)
694694

695695
- [API Documentation][gcloud-bigtable-docs]

packages/datastore/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @google-cloud/datastore ([Beta][versioning])
1+
# @google-cloud/datastore ([GA][versioning])
22
> Cloud Datastore Client Library for Node.js
33
44
*Looking for more Google APIs than just Datastore? You might want to check out [`google-cloud`][google-cloud].*

packages/logging/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @google-cloud/logging ([Beta][versioning])
1+
# @google-cloud/logging ([GA][versioning])
22
> Google Stackdriver Logging Client Library for Node.js
33
44
This module allows you to work with the Stackdriver Logging API. If you are already using [`winston`][winston]

0 commit comments

Comments
 (0)