-
Notifications
You must be signed in to change notification settings - Fork 43
chore: update docs & provide example code #144
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
Conversation
README.md
Outdated
| ``` | ||
|
|
||
| You can also pull the code from a fork of the repository. If you intend to become a Contributor to the project, read the section [Contributing to the project](#contributing-to-the-project) below on how to setup a fork. | ||
| You can also pull the code from a fork of the repository. If you intend to become a Contributor to the project, read the section [Contributing to the project](https://github.com/apache/openwhisk-client-go/blob/master/CONTRIBUTING.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should link to the separate CONTRIBUTING.md, but there are some basics here in this README now... could you put this back; then link to the CONTRIBUTING.md document at the start of that (i.e., #contributing-to-the-project) section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated doc to include contributing to the project section
README.md
Outdated
| We use a configuration file called _wskprop_ to specify all the parameters necessary for this Go client library to access the OpenWhisk services. Make sure you create or edit the file _~/.wskprops_, and add the mandatory parameters APIHOST, APIVERSION, NAMESPACE and AUTH. | ||
|
|
||
| - The parameter `APIHOST` is the OpenWhisk API hostname (for example, openwhisk.ng.bluemix.net, 172.17.0.1, and so on). | ||
| - The parameter `APIHOST` is the OpenWhisk API hostname (for example, us-east.functions.cloud.ibm.com, 172.17.0.1, and so on). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some text explaining that this APIHOST endpoint is a sample and you can substitute with that of any OW deployment? It would be great if we could have a "if you run OW locally your APIHOST might look like: xxx).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, the "tools/dev" README indicates the default Controller port to be used: https://github.com/apache/openwhisk/blob/master/tools/dev/README.md
~/.wskprops must be updated with APIHOST=http://localhost:10001 so that the wsk CLI communicates directly with the controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the "standalone server" starts on a diff. host:port:
https://github.com/apache/openwhisk/tree/master/core/standalone
It would be good to link/and explain these 2 common setting variants for APIHOST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated example for local stand-alone and cloud functions
| options := &whisk.ActionListOptions{ | ||
| Limit: 30, | ||
| Skip: 30, | ||
| Skip: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skippin g 30 would be silly for someone "getting started"; good change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the limit to 10 as this seems like what would be a logical default for many downstream tools that use the client...
README.md
Outdated
| config := &whisk.Config{ | ||
| Host: "openwhisk.ng.bluemix.net", | ||
| Version: "v1" | ||
| Host: "us-east.functions.cloud.ibm.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I use "us-south" (dallas)... as it has to match my IBM Cloud account... it would be good to make note of that somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated APIHOST parameter example should cover the different host values.
README.md
Outdated
| Version: "v1", | ||
| Namespace: "_", | ||
| AuthKey: "aaaaa-bbbbb-ccccc-ddddd-eeeee" | ||
| AuthToken: "aaaaa-bbbbb-ccccc-ddddd-eeeee", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch!
Update readme docs with new endpoint & fix example code.