Files
kubeshark/cli/cmd/fetch.go
gadotroee 2f33f9229a TRA-3234 Fetch command (#54)
* preparation to fetch command

* get har as zip from server

* no message

* no message
2021-05-24 19:29:46 +03:00

29 lines
670 B
Go

package cmd
import (
"github.com/spf13/cobra"
)
type MizuFetchOptions struct {
Limit uint16
Directory string
}
var mizuFetchOptions = MizuFetchOptions{}
var fetchCmd = &cobra.Command{
Use: "fetch",
Short: "Download recorded traffic to files",
RunE: func(cmd *cobra.Command, args []string) error {
RunMizuFetch(&mizuFetchOptions)
return nil
},
}
func init() {
rootCmd.AddCommand(fetchCmd)
fetchCmd.Flags().Uint16VarP(&mizuFetchOptions.Limit, "limit", "l", 1000, "Provide a custom limit for entries to fetch")
fetchCmd.Flags().StringVarP(&mizuFetchOptions.Directory, "directory", "d", ".", "Provide a custom directory for fetched entries")
}