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

Introduce pkg/grpcutil #617

Merged
merged 2 commits into from
Sep 11, 2018
Merged

Introduce pkg/grpcutil #617

merged 2 commits into from
Sep 11, 2018

Conversation

jzelinskie
Copy link
Contributor

This change refactors all of the gRPC code used in the v3 package to be generic and reusable.

This function was used for handling errors in the graceful library and
was never necessary for the v3 API.
@jzelinskie jzelinskie added kind/cleanup no functional changes, only reorganization component/api labels Sep 11, 2018
Copy link
Contributor

@KeyboardNerd KeyboardNerd left a comment

Choose a reason for hiding this comment

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

Some comments on gateway.go
We should also add tests on server connectivity in the future.

pkg/grpcutil/gateway.go Outdated Show resolved Hide resolved
if tlsConfig != nil {
var gwTLSConfig *tls.Config
gwTLSConfig = tlsConfig.Clone()
gwTLSConfig.InsecureSkipVerify = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a comment on why we use InsecureSkipVerify here?


srvmux := runtime.NewServeMux(
// Include empty fields with default values.
runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{EmitDefaults: true}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you remember why do we want to include the empty fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, just get rid of it, I don't think there will be any issues.

This change refactors gRPC code used within the v3 API package into
generic code that can be used for managing gRPC and gRPC Gateway.
Copy link
Contributor

@KeyboardNerd KeyboardNerd left a comment

Choose a reason for hiding this comment

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

LGTM

@jzelinskie jzelinskie merged commit 089a4e0 into quay:master Sep 11, 2018
@jzelinskie jzelinskie deleted the grpc-refactor branch September 11, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup no functional changes, only reorganization
Development

Successfully merging this pull request may close these issues.

None yet

2 participants