Skip to content

Commit

Permalink
Merge branch 'master' into change_peer_api
Browse files Browse the repository at this point in the history
  • Loading branch information
LykxSassinator authored Jun 13, 2024
2 parents 6c7098e + 9348164 commit 774fda1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewHandler(_ context.Context, svr *server.Server) (http.Handler, apiutil.AP
// "/checker/{name}", http.MethodPost
// "/checker/{name}", http.MethodGet
// "/schedulers", http.MethodGet
// "/schedulers/{name}", http.MethodPost
// "/schedulers/{name}", http.MethodPost, which is to be used to pause or resume the scheduler rather than create a new scheduler
// "/schedulers/diagnostic/{name}", http.MethodGet
// "/scheduler-config", http.MethodGet
// "/hotspot/regions/read", http.MethodGet
Expand All @@ -62,6 +62,8 @@ func NewHandler(_ context.Context, svr *server.Server) (http.Handler, apiutil.AP
// Following requests are **not** redirected:
// "/schedulers", http.MethodPost
// "/schedulers/{name}", http.MethodDelete
// Because the writing of all the config of the scheduling service is in the API server,
// we should not post and delete the scheduler directly in the scheduling service.
router.PathPrefix(apiPrefix).Handler(negroni.New(
serverapi.NewRuntimeServiceValidator(svr, group),
serverapi.NewRedirector(svr,
Expand Down Expand Up @@ -163,7 +165,7 @@ func NewHandler(_ context.Context, svr *server.Server) (http.Handler, apiutil.AP
mcs.SchedulingServiceName,
[]string{http.MethodGet}),
serverapi.MicroserviceRedirectRule(
prefix+"/schedulers/", // Note: this means "/schedulers/{name}"
prefix+"/schedulers/", // Note: this means "/schedulers/{name}", which is to be used to pause or resume the scheduler
scheapi.APIPathPrefix+"/schedulers",
mcs.SchedulingServiceName,
[]string{http.MethodPost}),
Expand Down

0 comments on commit 774fda1

Please sign in to comment.