feat: add cluster rest api to open api (#2707)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
6c07550032
commit
38b6c00a54
|
|
@ -237,6 +237,14 @@ func Init(cfg *config.Config, logDir string, service service.Service, database *
|
||||||
ojob.GET(":id", h.GetJob)
|
ojob.GET(":id", h.GetJob)
|
||||||
ojob.GET("", h.GetJobs)
|
ojob.GET("", h.GetJobs)
|
||||||
|
|
||||||
|
// Cluster.
|
||||||
|
oc := oapiv1.Group("/clusters", personalAccessToken)
|
||||||
|
oc.POST("", h.CreateCluster)
|
||||||
|
oc.DELETE(":id", h.DestroyCluster)
|
||||||
|
oc.PATCH(":id", h.UpdateCluster)
|
||||||
|
oc.GET(":id", h.GetCluster)
|
||||||
|
oc.GET("", h.GetClusters)
|
||||||
|
|
||||||
// TODO Remove this api.
|
// TODO Remove this api.
|
||||||
// Compatible with the V1 preheat.
|
// Compatible with the V1 preheat.
|
||||||
pv1 := r.Group("/preheats")
|
pv1 := r.Group("/preheats")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue