Files
kubeshark/cli/cmd/demo.go
Selton Fiuza 71eff5ea04 feature/TRA_3427_demo_mode (#150)
* Demo Mode MVP

* messages improve

* downloading based on the OS

* downloading based on the OS

* downloading based on the OS

* Modeler keep running

* A lot of revisions comes now

* Fix color
2021-07-28 14:50:15 -03:00

33 lines
930 B
Go

package cmd
import (
"github.com/spf13/cobra"
)
type MizuDemoOptions struct {
GuiPort uint16
Analyze bool
AnalyzeDestination string
}
var mizuDemoOptions = &MizuDemoOptions{}
var demoCmd = &cobra.Command{
Use: "demo",
Short: "Record ingoing traffic of a kubernetes pod",
Long: `Record the ingoing traffic of a kubernetes pod.
Supported protocols are HTTP and gRPC.`,
RunE: func(cmd *cobra.Command, args []string) error {
RunMizuTapDemo(mizuDemoOptions)
return nil
},
}
func init() {
rootCmd.AddCommand(demoCmd)
demoCmd.Flags().Uint16VarP(&mizuDemoOptions.GuiPort, "gui-port", "p", 8899, "Provide a custom port for the web interface webserver")
demoCmd.Flags().BoolVar(&mizuDemoOptions.Analyze, "analyze", false, "Uploads traffic to UP9 cloud for further analysis (Beta)")
demoCmd.Flags().StringVar(&mizuDemoOptions.AnalyzeDestination, "dest", "up9.app", "Destination environment")
}