Skip to content

Commit

Permalink
Revert "EDU-3149: Corrects broken Go 1.26+ SDK instructions for API k…
Browse files Browse the repository at this point in the history
…eys"

This reverts commit 5efd049.
  • Loading branch information
fairlydurable committed Sep 9, 2024
1 parent 5efd049 commit 9d2890d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/production-deployment/cloud/api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,15 @@ Create an initial connection:

```go
clientOptions := client.Options{
HostPort: hostPort,
Namespace: namespaceID,
HostPort: <endpoint>,
Namespace: <namespace.accountid>,
Credentials: client.NewAPIKeyStaticCredentials(<API key>),
ConnectionOptions: client.ConnectionOptions{
TLS: &tls.Config{},
DialOptions: []grpc.DialOption{
grpc.WithUnaryInterceptor(
func(ctx context.Context, method string, req any, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
return invoker(
metadata.AppendToOutgoingContext(ctx, "temporal-namespace", namespaceID),
metadata.AppendToOutgoingContext(ctx, "temporal-namespace", <namespace.accountid>),
method,
req,
reply,
Expand All @@ -393,12 +393,8 @@ clientOptions := client.Options{
),
},
},
Credentials: client.NewAPIKeyStaticCredentials(apiKey),
}
c, err := client.Dial(clientOptions)
if err != nil {
log.Fatalf("error creating temporal client: %v", err)
}
```

Update an API key:
Expand Down

0 comments on commit 9d2890d

Please sign in to comment.