Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute: support BackendServices #1159

Merged

Conversation

stephenplusplus
Copy link
Contributor

For #1073

This implements Backend Services, known here as "services".

To Dos

  • Tests
    • System
    • Unit
      • compute/index
      • compute/service
var service = compute.service('service-name');

service.getHealth({
  name: 'instance-group-name',
  zone: 'us-central1-a'
}, function(err, status) {
  status = [
    {
      ipAddress: '...',
      instance: '...',
      healthState: '...',
      port: '...'
    }
  ]
});

@stephenplusplus stephenplusplus added api: compute Issues related to the Compute Engine API. don't merge labels Mar 9, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2016
@callmehiphop callmehiphop mentioned this pull request Mar 9, 2016
20 tasks
@stephenplusplus
Copy link
Contributor Author

@callmehiphop I'm going to start on the unit tests, but let me know if you catch anything weird with the code.

@stephenplusplus
Copy link
Contributor Author

don't merge lifted!

* [BackendService resource](https://cloud.google.com/compute/docs/reference/v1/backendServices#resource).
* @param {function=} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request.
* @param {module:compute/network} callback.network - The created Network

This comment was marked as spam.

This comment was marked as spam.

* representing part of the larger set of results to view.
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request.
* @param {module:compute/snapshot} callback.snapshots - Snapshot objects from

This comment was marked as spam.

@callmehiphop
Copy link
Contributor

Is there a docs preview for this?

@stephenplusplus stephenplusplus force-pushed the spp--1073-backend-services branch 2 times, most recently from 4f79262 to 509c571 Compare March 21, 2016 16:11
@stephenplusplus
Copy link
Contributor Author

Docs preview up: http://stephenplusplus.github.io/gcloud-node/#/docs/master/compute/service

RE: the missing callback param docs, that was an intentional decision back when we introduced the famous "get or create" overhaul. While having multiple methods to get at the same data can be convenient, the consequence was having to write the exact same documentation in multiple places. That has some hazardous side effects if the code is updated with a docs change local to the source method, the branched methods that reference it would go out of date. The chosen path was simply to have a link back to the source method from the branched methods and let the example do a quick and dirty job of showing what will happen in your callback. If you have any ideas how we can improve on this, open an issue so we can #️⃣ it out!

@callmehiphop
Copy link
Contributor

Thanks for the preview! I think we need to add BackendServices to the site navigation via toc.json!

@@ -71,6 +71,9 @@
"title": "Region",
"type": "compute/region"
}, {
"title": "Service",
"type": "compute/service"
}, {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@callmehiphop
Copy link
Contributor

This might not be the place for it, but are there are any JSDoc tags (aside from link) that would allow us to inherit the documentation from one method to another?

*
* @param {string|object} group - The fully-qualified URL of an Instance Group
* resource.
* @param {string} - group.name - The name of the Instance Group resource.

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor Author

Not that I know of. Possibly the callback can be a "type" that we can then reference? I'm not sure if that's real / a hack usage.

callmehiphop added a commit that referenced this pull request Mar 21, 2016
@callmehiphop callmehiphop merged commit 1a2b2da into googleapis:master Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants