mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-22 22:39:40 +00:00
Upgrade Gin version and print the query string
This commit is contained in:
parent
fabffcdbc1
commit
aa09f904ee
@ -6,7 +6,7 @@ require (
|
|||||||
github.com/djherbis/atime v1.0.0
|
github.com/djherbis/atime v1.0.0
|
||||||
github.com/fsnotify/fsnotify v1.4.9
|
github.com/fsnotify/fsnotify v1.4.9
|
||||||
github.com/gin-contrib/static v0.0.1
|
github.com/gin-contrib/static v0.0.1
|
||||||
github.com/gin-gonic/gin v1.7.2
|
github.com/gin-gonic/gin v1.7.4
|
||||||
github.com/go-playground/locales v0.13.0
|
github.com/go-playground/locales v0.13.0
|
||||||
github.com/go-playground/universal-translator v0.17.0
|
github.com/go-playground/universal-translator v0.17.0
|
||||||
github.com/go-playground/validator/v10 v10.5.0
|
github.com/go-playground/validator/v10 v10.5.0
|
||||||
|
@ -75,6 +75,8 @@ github.com/gin-contrib/static v0.0.1/go.mod h1:CSxeF+wep05e0kCOsqWdAWbSszmc31zTI
|
|||||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||||
github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA=
|
github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA=
|
||||||
github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
||||||
|
github.com/gin-gonic/gin v1.7.4 h1:QmUZXrvJ9qZ3GfWvQ+2wnW/1ePrTEJqPKMYEU3lD/DM=
|
||||||
|
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
||||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||||
|
@ -77,7 +77,7 @@ func readConnectionSingle(wg *sync.WaitGroup, conn net.Conn, entry *map[string]i
|
|||||||
|
|
||||||
command := handleCommands(text)
|
command := handleCommands(text)
|
||||||
if !command {
|
if !command {
|
||||||
fmt.Printf("\b\b** %s\n> ", text)
|
// fmt.Printf("\b\b** %s\n> ", text)
|
||||||
|
|
||||||
if text == "" {
|
if text == "" {
|
||||||
err := scanner.Err()
|
err := scanner.Err()
|
||||||
@ -126,7 +126,7 @@ func readConnection(wg *sync.WaitGroup, conn net.Conn, ws *websocket.Conn) {
|
|||||||
|
|
||||||
command := handleCommands(text)
|
command := handleCommands(text)
|
||||||
if !command {
|
if !command {
|
||||||
fmt.Printf("\b\b** %s\n> ", text)
|
// fmt.Printf("\b\b** %s\n> ", text)
|
||||||
|
|
||||||
if text == "" {
|
if text == "" {
|
||||||
err := scanner.Err()
|
err := scanner.Err()
|
||||||
|
@ -2,6 +2,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@ -41,6 +42,7 @@ func init() {
|
|||||||
|
|
||||||
func WebSocketRoutes(app *gin.Engine, eventHandlers EventHandlers) {
|
func WebSocketRoutes(app *gin.Engine, eventHandlers EventHandlers) {
|
||||||
app.GET("/ws", func(c *gin.Context) {
|
app.GET("/ws", func(c *gin.Context) {
|
||||||
|
fmt.Printf("query: %v\n", c.Request.URL.Query())
|
||||||
query := c.DefaultQuery("q", "")
|
query := c.DefaultQuery("q", "")
|
||||||
websocketHandlerUI(c.Writer, c.Request, eventHandlers, false, query)
|
websocketHandlerUI(c.Writer, c.Request, eventHandlers, false, query)
|
||||||
})
|
})
|
||||||
|
@ -200,6 +200,7 @@ func (provider *Provider) CreateMizuApiServerPod(ctx context.Context, opts *ApiS
|
|||||||
Name: opts.PodName,
|
Name: opts.PodName,
|
||||||
Image: opts.PodImage,
|
Image: opts.PodImage,
|
||||||
ImagePullPolicy: opts.ImagePullPolicy,
|
ImagePullPolicy: opts.ImagePullPolicy,
|
||||||
|
Ports: []core.ContainerPort{{HostPort: 0, ContainerPort: 8899}},
|
||||||
VolumeMounts: []core.VolumeMount{
|
VolumeMounts: []core.VolumeMount{
|
||||||
{
|
{
|
||||||
Name: mizu.ConfigMapName,
|
Name: mizu.ConfigMapName,
|
||||||
|
Loading…
Reference in New Issue
Block a user