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

fix go example for pulsar-examples #30

Merged
merged 8 commits into from
Aug 7, 2020

Conversation

wolfstudy
Copy link
Contributor

Signed-off-by: xiaolong.ran rxl@apache.org

fix go example for pulsar-examples

Signed-off-by: xiaolong.ran <rxl@apache.org>
@wolfstudy wolfstudy requested a review from a team as a code owner August 7, 2020 07:10
@wolfstudy wolfstudy self-assigned this Aug 7, 2020
- Get the OAuth2 `privateKeyFile` of a service account to access your StreamNative Cloud Pulsar cluster: [How to get OAuth2 options](#How to get OAuth2 options)
- Get the `audience` of the your StreamNative Cloud Pulsar cluster: [How to get OAuth2 options](#How to get OAuth2 options)
- Get the `issuerUrl` of the your StreamNative Cloud Pulsar cluster: [How to get OAuth2 options](#How to get OAuth2 options)
- Get the `clientId` of the your StreamNative Cloud Pulsar cluster: [How to get OAuth2 options](#How to get OAuth2 options)
Copy link
Contributor

Choose a reason for hiding this comment

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

clientId is already contained in "privateKeyFile"?

Copy link
Contributor

Choose a reason for hiding this comment

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

synced with @zymap, this is special in go for support different type

cloud/go/README.md Outdated Show resolved Hide resolved
Signed-off-by: xiaolong.ran <rxl@apache.org>
Signed-off-by: xiaolong.ran <rxl@apache.org>
## How to get token options

When you use Token to connect to Pulsar cluster, you need to provide the following options:
## How to get service URL
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest we add a full pre-condition, e.g. created a instance like instance-Name; created cluster like cluster-name; create ns like ns-name ....
so all the shell command will contain a command as current, and also a real command with above pre-condition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jiazhai done PTAL again, thanks

Signed-off-by: xiaolong.ran <rxl@apache.org>
Signed-off-by: xiaolong.ran <rxl@apache.org>
@@ -25,61 +25,98 @@ The following clients and Pulsar CLI tools are supported to connect to cluster t
- pulsar-client
- pulsar-perf

## How to get token options
Before starting, we assume that the `service account`, `pulsar instance` and `pulsar cluster` have been created in the current environment, and their `names` and `namespace` as follows:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add link of how these resources are created.

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is currently no link, please add an issue to add it later.

cloud/README.md Outdated Show resolved Hide resolved
```

Output:

```text
api.test.cloud.xxx.streamnative.dev
cloud.streamnative.dev
Copy link
Contributor

Choose a reason for hiding this comment

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

in the pre-condition, it still not describe where cloud.streamnative.dev comes from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cloud.streamnative.dev is obtained by the following command:

snctl pulsarclusters get test-pulsar-cluster-name -n test-pulsar-cluster-namespace -o json | jq '.spec.serviceEndpoints[0].dnsName'

cloud/README.md Outdated Show resolved Hide resolved
Signed-off-by: xiaolong.ran <rxl@apache.org>
Signed-off-by: xiaolong.ran <rxl@apache.org>
@Huanli-Meng Huanli-Meng merged commit c14b487 into master Aug 7, 2020
@Huanli-Meng Huanli-Meng deleted the xiaolong/fix-go-client-example branch August 7, 2020 11:21
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants