@@ -31,6 +31,7 @@ import (
3131 ge "github.com/skydive-project/skydive/gremlin/traversal"
3232 shttp "github.com/skydive-project/skydive/http"
3333 "github.com/skydive-project/skydive/logging"
34+ "github.com/skydive-project/skydive/websocket"
3435 "github.com/spf13/cobra"
3536)
3637
@@ -91,7 +92,7 @@ var HubCmd = &cobra.Command{
9192
9293 authBackend := shttp .NewNoAuthenticationBackend ()
9394
94- // declare all extension available throught API and filtering
95+ // declare all extension available through API and filtering
9596 tr := traversal .NewGremlinTraversalParser ()
9697 tr .AddTraversalExtension (ge .NewDescendantsTraversalExtension ())
9798
@@ -101,7 +102,14 @@ var HubCmd = &cobra.Command{
101102 }
102103 api .RegisterTopologyAPI (httpServer , g , tr , authBackend )
103104
104- hub , err := hub .NewHub (httpServer , g , cached , authBackend , authBackend , nil , "/ws/pod" , writeCompression , queueSize , time .Second * time .Duration (pingDelay ), time .Second * time .Duration (pongTimeout ))
105+ serverOpts := websocket.ServerOpts {
106+ WriteCompression : writeCompression ,
107+ QueueSize : queueSize ,
108+ PingDelay : time .Second * time .Duration (pingDelay ),
109+ PongTimeout : time .Second * time .Duration (pongTimeout ),
110+ }
111+
112+ hub , err := hub .NewHub (httpServer , g , cached , authBackend , authBackend , nil , "/ws/pod" , nil , serverOpts )
105113 if err != nil {
106114 logging .GetLogger ().Error (err )
107115 os .Exit (1 )
0 commit comments