add retry mechanism for pushing config#26
Open
jk-tonycui wants to merge 2 commits intoopensergo:mainfrom
Open
Conversation
e0a12d6 to
7226883
Compare
Member
|
Could you please sign the CLA here: https://cla-assistant.io/opensergo/opensergo-control-plane?pullRequest=26 |
Member
|
And could you please illustrate your design in PR description? |
jnan806
reviewed
Nov 16, 2022
jnan806
reviewed
Nov 21, 2022
| @@ -0,0 +1,33 @@ | |||
| package options | |||
Collaborator
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-retryfor this feature. Meanwhile, addoptionsfeature 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