21 lines
435 B
Go
21 lines
435 B
Go
package ws
|
|
|
|
import (
|
|
"github.com/gorilla/websocket"
|
|
)
|
|
|
|
func LogsHandler(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 logs streaming
|
|
// This will connect to k8s logs API and stream logs via WebSocket
|
|
|
|
return nil
|
|
}
|