-
Notifications
You must be signed in to change notification settings - Fork 23
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 retry mechanism for pushing config #26
base: main
Are you sure you want to change the base?
add retry mechanism for pushing config #26
Conversation
e0a12d6
to
7226883
Compare
Could you please sign the CLA here: https://cla-assistant.io/opensergo/opensergo-control-plane?pullRequest=26 |
And could you please illustrate your design in PR description? |
@@ -0,0 +1,33 @@ | |||
package options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the following license header in all your addition files, thanks.
// Copyright 2022, OpenSergo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Add user-define configuration feature and retry feature for pushing config.
The main idea is to add retry ability for
stream.SendMsg
. From the general perspective, adopt third-party libgo-retry
for this feature. Meanwhile, addoptions
feature to store user's configuration.For the timeout issue, it seems to be set from the client side from the grpc document.
增加了配置传参和配置推送重试的功能。
设计思路是在推动配置的
stream.SendMsg
上增加重试能力,在更通用性以及避免重复造轮子,采用了 go-retry 的三方库。同时为了实现重试等功能的可配置,在整个控制面上增加了options
功能来保存用户配置。grpc的超时设置翻看了下grpc文档以及源码,初步得出的结论是要在客户端上设置,配置推送作为服务端,没看到有拓展的接口可以进行设置。 @sczyh30