Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions temporalcli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ func (c *ClientOptions) dialClient(cctx *CommandContext) (client.Client, error)
if err != nil {
return nil, fmt.Errorf("failed creating client options: %w", err)
}

if c.ClientAuthority != "" {
clientOptions.ConnectionOptions.Authority = c.ClientAuthority
}

clientOptions.Logger = log.NewStructuredLogger(cctx.Logger)
clientOptions.Identity = clientIdentity()
// We do not put codec on data converter here, it is applied via
Expand Down
2 changes: 2 additions & 0 deletions temporalcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var hasHighlighting = isatty.IsTerminal(os.Stdout.Fd())

type ClientOptions struct {
Address string
ClientAuthority string
Namespace string
ApiKey string
GrpcMeta []string
Expand All @@ -37,6 +38,7 @@ type ClientOptions struct {

func (v *ClientOptions) buildFlags(cctx *CommandContext, f *pflag.FlagSet) {
f.StringVar(&v.Address, "address", "127.0.0.1:7233", "Temporal Service gRPC endpoint.")
f.StringVar(&v.ClientAuthority, "client-authority", "", "Temporal gRPC client :authority pseudoheader.")
f.StringVarP(&v.Namespace, "namespace", "n", "default", "Temporal Service Namespace.")
f.StringVar(&v.ApiKey, "api-key", "", "API key for request.")
f.StringArrayVar(&v.GrpcMeta, "grpc-meta", nil, "HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers. Can also be made available via environment variable as `TEMPORAL_GRPC_META_[name]`.")
Expand Down
3 changes: 3 additions & 0 deletions temporalcli/commandsgen/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4051,6 +4051,9 @@ option-sets:
description: Temporal Service gRPC endpoint.
default: 127.0.0.1:7233
implied-env: TEMPORAL_ADDRESS
- name: client-authority
type: string
description: Temporal gRPC client :authority pseudoheader.
- name: namespace
short: n
type: string
Expand Down
Loading