Skip to content

Conversation

@skbihari
Copy link
Contributor

@skbihari skbihari commented Mar 1, 2021

Update readme docs with new endpoint & fix example code.

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).
Copy link
Contributor

@mrutkows mrutkows Mar 2, 2021

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?

Copy link
Contributor Author

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).
Copy link
Contributor

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).

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

@skbihari skbihari Mar 2, 2021

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,
Copy link
Contributor

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.

Copy link
Contributor

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",
Copy link
Contributor

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.

Copy link
Contributor Author

@skbihari skbihari Mar 2, 2021

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@mrutkows mrutkows merged commit cc53c35 into apache:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants