21 lines
443 B
Go
21 lines
443 B
Go
package ws
|
|
|
|
import (
|
|
"github.com/gorilla/websocket"
|
|
)
|
|
|
|
func ShellHandler(conn *websocket.Conn, r *http.Request) error {
|
|
// Extract pod and namespace from query params
|
|
pod := r.URL.Query().Get("pod")
|
|
namespace := r.URL.Query().Get("ns")
|
|
|
|
if pod == "" || namespace == "" {
|
|
return websocket.CloseBadRequest
|
|
}
|
|
|
|
// TODO: Implement shell connection
|
|
// This will connect to k8s exec API and proxy WebSocket ↔ k8s stream
|
|
|
|
return nil
|
|
}
|