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

Temporal Nexus: Go SDK Feature Guide #3057

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Temporal Nexus: Go SDK Feature Guide #3057

wants to merge 20 commits into from

Conversation

jsundai
Copy link
Contributor

@jsundai jsundai commented Sep 3, 2024

What does this PR do?

adds temporal nexus into the go sdk feature guide
Preview

Notes to reviewers

@jsundai jsundai marked this pull request as ready for review September 12, 2024 22:48
@jsundai jsundai requested a review from a team as a code owner September 12, 2024 22:48
docs/develop/go/index.mdx Outdated Show resolved Hide resolved
Comment on lines 46 to 61
```
temporal server start-dev --http-port 7243 --dynamic-config-value system.enableNexus=true
```

This command automatically starts the Web UI, creates the default Namespace, and uses an in-memory database.

The Temporal Server should be available on `localhost:7233` and the Temporal Web UI should be accessible at [http://localhost:8233](http://localhost:8233).

## Create caller and handler Namespaces {#create-caller-handler-namespaces}

Before setting up Nexus endpoints, create separate namespaces for the caller and handler.

```
temporal operator namespace create --namespace my-target-namespace
temporal operator namespace create --namespace my-caller-namespace
```
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can condense this into a single step with start-dev --namespace my-target-namespace --namespace my-caller-namespace ... if you want, it'll save you having to mention the default namespace that gets created.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just hopping in here to mention that to align with existing temporal CLI docs, we use:

docs% temporal operator namespace
Manage Temporal Cluster (Service) Namespaces:

temporal operator namespace [command] [command options]

For example:

temporal operator namespace create \
    --namespace YourNewNamespaceName

Usage:
  temporal operator namespace [command]

TMI: tcld uses a different convention (specifically <namespace_id>.<account_id>, but it is not yet all aligned)

docs/develop/go/temporal-nexus.mdx Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
@bergundy
Copy link
Member

@jsundai I will do another pass tomorrow, I am off today.

docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Show resolved Hide resolved
docs/develop/go/temporal-nexus.mdx Outdated Show resolved Hide resolved
sample-apps/go/nexus/README.md Outdated Show resolved Hide resolved
Nexus events are included in the caller’s Workflow history:

```
temporal workflow show -w <ID>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
temporal workflow show -w <ID>
temporal workflow show \
-workflow-id YourWorkflowID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to not delay getting these Nexus docs live and published, this seems like something that would require further discussion. I will make a separate PR outside of this one.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's much of a rush to merge this. Up to you if you want to postpone and handle in a separate PR.

Comment on lines +163 to +164
// ...
// See alternatives at https://pkg.go.dev/go.temporal.io/sdk/temporalnexus.
Copy link
Member

Choose a reason for hiding this comment

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

This snippet should start either at the start of this comment or strip it out.

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.

4 participants