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

xds: change ServerConfig type to have a single method to return all configured dial options #7661

Closed
easwars opened this issue Sep 23, 2024 · 0 comments · Fixed by #7680 or #7718
Closed
Assignees
Labels
Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc

Comments

@easwars
Copy link
Contributor

easwars commented Sep 23, 2024

The ServerConfig type in internal bootstrap package currently stores the credentials configured for the server config as a dial option here: https://github.com/grpc/grpc-go/blob/master/internal/xds/bootstrap/bootstrap.go#L177-L181 and it has a method to return the configured credentials as dial option here:

func (sc *ServerConfig) CredsDialOption() grpc.DialOption {

As part of #7586, we are adding more dial options to the server config, and the PR currently adds a new method to return the new dial option. Once that PR is merged, we should instead have a single method in the ServerConfig type that returns a slice of dial options.

These dial options are usually retrieved from the ServerConfig when a transport to the corresponding server is being created. This is currently where it is being used:

opts.ServerCfg.CredsDialOption(),
The caller here does not care what the dial options are, and instead of making multiple calls to retrieve all the configured dial options, it would be easier/nicer to make a single call on the ServerConfig that returns all configured dial options.

@easwars easwars added Type: Feature New features or improvements in behavior Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc and removed Type: Feature New features or improvements in behavior labels Sep 23, 2024
@purnesh42H purnesh42H reopened this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc
Projects
None yet
3 participants