mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-10-10 05:13:46 +00:00
21 lines
498 B
Go
21 lines
498 B
Go
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/up9inc/mizu/agent/pkg/providers/tappedPods"
|
|
"github.com/up9inc/mizu/shared"
|
|
"github.com/up9inc/mizu/shared/logger"
|
|
)
|
|
|
|
func BroadcastTappedPodsStatus() {
|
|
tappedPodsStatus := tappedPods.GetTappedPodsStatus()
|
|
|
|
message := shared.CreateWebSocketStatusMessage(tappedPodsStatus)
|
|
if jsonBytes, err := json.Marshal(message); err != nil {
|
|
logger.Log.Errorf("Could not Marshal message %v", err)
|
|
} else {
|
|
BroadcastToBrowserClients(jsonBytes)
|
|
}
|
|
}
|