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

Add WithResolverUserOptions for custom resolver build options #1711

Merged
merged 2 commits into from
Dec 6, 2017

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Dec 5, 2017

fixes #1710

waitForHandshake bool
resolverBuilder resolver.Builder
// Custom user options for resolver.Build.
resolverBuildUserOptions interface{}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe buildResolverUserOptions? or userOptionsForBuildResolver?

Copy link
Member

Choose a reason for hiding this comment

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

resolverBuilderUserOptions?

I'm also OK with this as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea was this is like resolver.Build(UserOptions).
Keeping this as it is now.

@dzbarsky
Copy link
Contributor

dzbarsky commented Dec 5, 2017

great, that works for me. thanks!

waitForHandshake bool
resolverBuilder resolver.Builder
// Custom user options for resolver.Build.
resolverBuildUserOptions interface{}
Copy link
Member

Choose a reason for hiding this comment

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

resolverBuilderUserOptions?

I'm also OK with this as-is.

clientconn.go Outdated
@@ -223,6 +225,14 @@ func withResolverBuilder(b resolver.Builder) DialOption {
}
}

// WithResolverUserOptions returns a DialOptions which sets the UserOptions
Copy link
Member

Choose a reason for hiding this comment

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

*DialOption

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

@menghanl menghanl left a comment

Choose a reason for hiding this comment

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

Thanks for the review.

waitForHandshake bool
resolverBuilder resolver.Builder
// Custom user options for resolver.Build.
resolverBuildUserOptions interface{}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea was this is like resolver.Build(UserOptions).
Keeping this as it is now.

clientconn.go Outdated
@@ -223,6 +225,14 @@ func withResolverBuilder(b resolver.Builder) DialOption {
}
}

// WithResolverUserOptions returns a DialOptions which sets the UserOptions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@menghanl menghanl merged commit ff1be3f into grpc:master Dec 6, 2017
@menghanl menghanl deleted the resolver_user_options branch December 6, 2017 23:54
@dfawley dfawley added the Type: Feature New features or improvements in behavior label Jan 2, 2018
@dfawley dfawley added this to the 1.9 Release milestone Jan 2, 2018
menghanl added a commit to menghanl/grpc-go that referenced this pull request Jan 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New resolver API is less usable than previous iteration
3 participants