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

[SL-38176] feat: make server options configurable #31

Merged

Conversation

david-zw-liu
Copy link
Contributor

@david-zw-liu david-zw-liu commented Jan 4, 2024

Why?

預設 grpc 接收的 request payload 上限為 4mb,
但因為 blog-service 文章數較多時,有可能會超過,
需要拉高上限時發現沒有地方可以調整。

How?

新增一個方式可以調整 server 設定

Test Plan

ENG self-testing / QA testing

Others

Usage

func (m *GrpcModule) Provide() []interface{} {
	goAppGrpc.SetGlobalServerOptions(grpc.MaxRecvMsgSize(20 * 1024 * 1024))

	return []interface{}{
		func(
			grpcServer *presets.DefaultGrpcServerWithNewrelic,
			postsController *controllers.PostsController,
		) *GrpcModule {

@david-zw-liu david-zw-liu changed the title feat: make server options configurable [SL-38176] feat: make server options configurable Jan 4, 2024
@david-zw-liu david-zw-liu merged commit 5d5d317 into master Jan 4, 2024
2 checks passed
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