mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-10 06:50:54 +00:00
Adding the upload interval as parameter to tap function
This commit is contained in:
@@ -253,14 +253,14 @@ func portForwardApiPod(ctx context.Context, kubernetesProvider *kubernetes.Provi
|
||||
|
||||
time.Sleep(time.Second * 5) // Waiting to be sure the proxy is ready
|
||||
if tappingOptions.Analyze {
|
||||
url_path := fmt.Sprintf("http://%s/api/uploadEntries?dest=%s&interval=%s", mizuProxiedUrl, url.QueryEscape(tappingOptions.AnalyzeDestination), tappingOptions.SleepIntervalSec)
|
||||
url_path := fmt.Sprintf("http://%s/api/uploadEntries?dest=%s&interval=%v", mizuProxiedUrl, url.QueryEscape(tappingOptions.AnalyzeDestination), tappingOptions.SleepIntervalSec)
|
||||
u, err := url.ParseRequestURI(url_path)
|
||||
if err != nil {
|
||||
log.Fatal(fmt.Sprintf("Failed parsing the URL %v\n", err))
|
||||
}
|
||||
rlog.Debugf("Sending get request to %v\n", u.String())
|
||||
if response, err := http.Get(u.String()); err != nil && response.StatusCode != 200 {
|
||||
fmt.Printf("error sending upload entries req %v\n", err)
|
||||
if response, err := http.Get(u.String()); err != nil || response.StatusCode != 200 {
|
||||
fmt.Printf("error sending upload entries req, status code: %v, err: %v\n", response.StatusCode, err)
|
||||
} else {
|
||||
fmt.Printf(mizu.Purple, "Traffic is uploading to UP9 for further analsys")
|
||||
fmt.Println()
|
||||
|
Reference in New Issue
Block a user