mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-15 23:25:34 +00:00
🔨 Rename WaitForFinish
method to WaitForTermination
This commit is contained in:
parent
11a2f93e34
commit
33f23ea849
@ -238,7 +238,7 @@ func pcap() {
|
||||
|
||||
ctxC, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
utils.WaitForFinish(ctxC, cancel)
|
||||
utils.WaitForTermination(ctxC, cancel)
|
||||
|
||||
err = stopAndRemoveContainers(ctx, cli, respFront, respHub, respWorker)
|
||||
if err != nil {
|
||||
|
@ -64,7 +64,7 @@ func runProxy() {
|
||||
|
||||
okToOpen(url)
|
||||
|
||||
utils.WaitForFinish(ctx, cancel)
|
||||
utils.WaitForTermination(ctx, cancel)
|
||||
}
|
||||
|
||||
func okToOpen(url string) {
|
||||
|
@ -100,7 +100,7 @@ func tap() {
|
||||
go goUtils.HandleExcWrapper(watchFrontPod, ctx, kubernetesProvider, cancel)
|
||||
|
||||
// block until exit signal or error
|
||||
utils.WaitForFinish(ctx, cancel)
|
||||
utils.WaitForTermination(ctx, cancel)
|
||||
}
|
||||
|
||||
func finishTapExecution(kubernetesProvider *kubernetes.Provider) {
|
||||
|
@ -80,7 +80,7 @@ func (connector *Connector) PostWorkerPodToHub(pod *v1.Pod) {
|
||||
ok = true
|
||||
log.Debug().Interface("worker-pod", pod).Msg("Reported worker pod to Hub:")
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ func (connector *Connector) PostTargettedPodsToHub(pods []core.Pod) {
|
||||
ok = true
|
||||
log.Debug().Int("pod-count", len(pods)).Msg("Reported targetted pods to Hub:")
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ func cleanUpNonRestrictedMode(ctx context.Context, cancel context.CancelFunc, ku
|
||||
func waitUntilNamespaceDeleted(ctx context.Context, cancel context.CancelFunc, kubernetesProvider *kubernetes.Provider, kubesharkResourcesNamespace string) {
|
||||
// Call cancel if a terminating signal was received. Allows user to skip the wait.
|
||||
go func() {
|
||||
utils.WaitForFinish(ctx, cancel)
|
||||
utils.WaitForTermination(ctx, cancel)
|
||||
}()
|
||||
|
||||
if err := kubernetesProvider.WaitUtilNamespaceDeleted(ctx, kubesharkResourcesNamespace); err != nil {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func WaitForFinish(ctx context.Context, cancel context.CancelFunc) {
|
||||
func WaitForTermination(ctx context.Context, cancel context.CancelFunc) {
|
||||
log.Debug().Msg("Waiting to finish...")
|
||||
sigChan := make(chan os.Signal, 1)
|
||||
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
|
||||
|
Loading…
Reference in New Issue
Block a user