Skip to content

node: Add ability to pass custom headers to Sui gRPC#4890

Open
djb15 wants to merge 1 commit into
wormhole-foundation:mainfrom
djb15:node/sui-grpc-headers
Open

node: Add ability to pass custom headers to Sui gRPC#4890
djb15 wants to merge 1 commit into
wormhole-foundation:mainfrom
djb15:node/sui-grpc-headers

Conversation

@djb15

@djb15 djb15 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

}, nil
}

func parseGrpcHeaderSpecs(headerSpecs []string) (metadata.MD, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: I think some of this logic could be replaced by using cobra's built-in parsing.

This is an example that parses key-value pairs:

var labels map[string]string

cmd.Flags().StringToStringVar(
    &labels,
    "label",
    nil,
    "key-value labels, e.g. --label env=prod,team=infra",
)

It might make more sense to put this in a the cmd/ code as well since this is related to CLI input parsing rather than Sui client code.

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.

2 participants