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

add retry mechanism for pushing config #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jk-tonycui
Copy link

@jk-tonycui jk-tonycui commented Nov 15, 2022

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 lib go-retry for this feature. Meanwhile, add options 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

@CLAassistant
Copy link

CLAassistant commented Nov 15, 2022

CLA assistant check
All committers have signed the CLA.

@sczyh30
Copy link
Member

sczyh30 commented Nov 16, 2022

Could you please sign the CLA here: https://cla-assistant.io/opensergo/opensergo-control-plane?pullRequest=26

@sczyh30
Copy link
Member

sczyh30 commented Nov 16, 2022

And could you please illustrate your design in PR description?

control_plane.go Outdated Show resolved Hide resolved
@@ -0,0 +1,33 @@
package options
Copy link
Collaborator

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.

Copy link
Author

Choose a reason for hiding this comment

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

OK.

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.

None yet

4 participants