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

fix: Removed leaky abstraction #150

Merged
merged 4 commits into from
Feb 9, 2022
Merged

fix: Removed leaky abstraction #150

merged 4 commits into from
Feb 9, 2022

Conversation

raserva
Copy link
Contributor

@raserva raserva commented Feb 9, 2022

Fixes: #76

Disclaimer: my golang knowledge is only slightly more than my cat's 🐱. Doing my best to be idomatic, but please let me know if you see things that seem odd or non-standard in golang.

@raserva raserva requested review from a team, yolocs and capri-xiyue February 9, 2022 00:09
@raserva
Copy link
Contributor Author

raserva commented Feb 9, 2022

Few things i wasn't sure about:

  • Right now i'm taking advantage of the anonymous Client in the Interceptor struct to directly call the client's Stop. Wasn't sure if i should name it instead, or make a Stop method for the interceptor that calls the client to make it more explicit.
  • considered modifying the interceptor.UnaryInterceptor call to already include the grpc.UnaryInterceptor() wrapping

clients/go/pkg/auditopt/config.go Show resolved Hide resolved
clients/go/pkg/auditopt/config.go Outdated Show resolved Hide resolved
clients/go/pkg/auditopt/config.go Show resolved Hide resolved
clients/go/test/grpc-app/main.go Show resolved Hide resolved
@@ -102,20 +101,20 @@ func FromConfigFile(path string) audit.Option {
// s := grpc.NewServer(opt)
// ```
// TODO(#109): add streaming interceptor.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this still relevant to this func?

@raserva raserva merged commit 6c9b6e4 into main Feb 9, 2022
@raserva raserva deleted the rsrv/integ-client branch February 9, 2022 21:41
yolocs pushed a commit that referenced this pull request Jun 13, 2023
* fix: Removed leaky abstraction

* added error checking

* add context to errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Go: avoid leaky encapsulation when creating the gRPC interceptor
5 participants