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

grpc client template with logging, metric and circuit-breaker #627

Merged
merged 12 commits into from
Aug 28, 2019

Conversation

rpatali
Copy link
Contributor

@rpatali rpatali commented Aug 23, 2019

I'm working on adding a few more tests but in the meanwhile, wanted to get an early review going. Some more refactor is in the progress as well.

@rpatali rpatali changed the title wip: grpc client template with logging, metric and circuit-breaker grpc client template with logging, metric and circuit-breaker Aug 25, 2019
rpatali added 11 commits August 26, 2019 14:38
initial gRPC implementation delegated everything directly to YARPC.
key changes in this diff:
- gRPC client template has logging, metric and circuit breaking
- Proto file parsing for extracting methods and req/res types
- implement SpecProvider interface for use in incremental build as well as template
hydrate
although yarpc supports other protocols, the structs we have is designed for grpc support specifically so gRPC in the name is the right abstraction instead of YARPC.
@rpatali rpatali force-pushed the rpatali/yarpc-client-template branch from 7e49bdc to a9b6b6c Compare August 26, 2019 21:40
@coveralls
Copy link

coveralls commented Aug 26, 2019

Coverage Status

Coverage increased (+0.2%) to 67.831% when pulling acd3f55 on rpatali/yarpc-client-template into d616a9d on master.

RequestVolumeThreshold: requestVolumeThreshold,
Timeout: timeoutVal,
})
return circuitBreakerDisabled
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be return true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh right.

@rpatali rpatali merged commit 9e6edb9 into master Aug 28, 2019
@rpatali rpatali deleted the rpatali/yarpc-client-template branch August 28, 2019 04:40
}
}

func configureCicruitBreaker(deps *module.Dependencies, timeoutVal int) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should create a common template the common parts of the HTTP, GRPC and Tchannel templates to avoid duplicate templates. There's some info here on nested templates: https://golang.org/pkg/text/template/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should create a common template the common parts of the HTTP, GRPC and Tchannel templates to avoid duplicate templates. There's some info here on nested templates: https://golang.org/pkg/text/template/

Good point. Makes sense.

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.

4 participants