documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Pre-fill cloud address and namespace in connection code

Open lorensr opened this issue 3 years ago • 0 comments

Brief description

Whenever we have a snippet like this:

  const connection = await Connection.connect({
    address: 'foo.bar.tmprl.cloud',
    tls: {
      clientCertPair: {
        crt: fs.readFileSync(clientCertPath),
        key: fs.readFileSync(clientKeyPath),
      },
    },
  });
  const client = new WorkflowClient({ connection, namespace: 'foo.bar' });

If a user is a Cloud user, fill in the address and namespace with the namespace that user last used in Cloud.

Depends on https://github.com/temporalio/cloud-ui/issues/95

Suggested by @mfateev

lorensr avatar Jul 25 '22 22:07 lorensr