-
Notifications
You must be signed in to change notification settings - Fork 727
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
client: add sdk api to get the config of the special scheduler #9140
Conversation
Signed-off-by: 童剑 <[email protected]>
Skipping CI for Draft Pull Request. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9140 +/- ##
==========================================
- Coverage 76.37% 76.28% -0.10%
==========================================
Files 474 474
Lines 72400 72424 +24
==========================================
- Hits 55297 55246 -51
- Misses 13644 13701 +57
- Partials 3459 3477 +18
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
client/http/interface.go
Outdated
// GetSchedulerConfig returns the configuration of the specified scheduler for pd cluster | ||
func (c *client) GetSchedulerConfig(ctx context.Context, name string) (map[string]any, error) { | ||
var config map[string]any | ||
uri := path.Join(SchedulerConfig, name, "list") |
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.
Please create a function in http/api.go
to generate the URI, such as SchedulerConfigByName
.
client/http/interface.go
Outdated
"name": name, | ||
"store_id": storeID, | ||
}) | ||
func (c *client) CreateScheduler(ctx context.Context, name string, input map[string]any) error { |
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.
We could consider keeping both API methods. Users who want to create a scheduler with customized data can use CreateSchedulerWithInput
, while those who only need to provide a name
and storeID
can use CreateScheduler
.
Signed-off-by: 童剑 <[email protected]>
7872fb0
to
f9a59cd
Compare
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.
Please fix ci. Rest LGTM.
Signed-off-by: 童剑 <[email protected]>
f9a59cd
to
fa9a800
Compare
Signed-off-by: 童剑 <[email protected]>
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.
Rest LGTM.
Signed-off-by: 童剑 <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, lhy1024 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Close #9141
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
Release note