@@ -41,14 +41,14 @@ func addWebService(c *restful.Container) error {
|
||||
|
||||
tags := []string{"Terminal"}
|
||||
|
||||
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pods}").
|
||||
webservice.Route(webservice.GET("/namespaces/{namespace}/pods/{pod}").
|
||||
To(terminal.CreateTerminalSession).
|
||||
Doc("create terminal session").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Writes(models.PodInfo{}))
|
||||
|
||||
path := runtime.ApiRootPath + "/" + GroupVersion.String() + "/sockjs"
|
||||
c.Handle(path, terminal.NewTerminalHandler(path))
|
||||
c.Handle(path+"/", terminal.NewTerminalHandler(path))
|
||||
|
||||
c.Add(webservice)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user