Last active
February 4, 2020 06:12
-
-
Save ihcsim/a048e24fac5fc6a9f1a46bcce19b099d to your computer and use it in GitHub Desktop.
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
| // InstallDebuggingHandlers registers the HTTP request patterns that serve logs or run commands/containers | |
| func (s *Server) InstallDebuggingHandlers(criHandler http.Handler) { | |
| // ... | |
| ws = new(restful.WebService) | |
| ws. | |
| Path("/exec") | |
| ws.Route(ws.GET("/{podNamespace}/{podID}/{containerName}"). | |
| To(s.getExec). | |
| Operation("getExec")) | |
| ws.Route(ws.POST("/{podNamespace}/{podID}/{containerName}"). | |
| To(s.getExec). | |
| Operation("getExec")) | |
| ws.Route(ws.GET("/{podNamespace}/{podID}/{uid}/{containerName}"). | |
| To(s.getExec). | |
| Operation("getExec")) | |
| ws.Route(ws.POST("/{podNamespace}/{podID}/{uid}/{containerName}"). | |
| To(s.getExec). | |
| Operation("getExec")) | |
| s.restfulCont.Add(ws) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment