Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Mizu
Commits
79ba9855
Commit
79ba9855
authored
4 years ago
by
up9-github
Browse files
Options
Download
Email Patches
Plain Diff
Update mizu.go
parent
ff6922d5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cli/mizu/mizu.go
+4
-1
cli/mizu/mizu.go
with
4 additions
and
1 deletion
+4
-1
cli/mizu/mizu.go
+
4
-
1
View file @
79ba9855
...
...
@@ -36,7 +36,7 @@ func Run(podRegex *regexp.Regexp) {
}
func
watchPodsForTapping
(
ctx
context
.
Context
,
kubernetesProvider
*
kubernetes
.
Provider
,
cancel
context
.
CancelFunc
,
podRegex
*
regexp
.
Regexp
)
{
added
,
_
,
removed
,
errorChan
:=
kubernetes
.
FilteredWatch
(
ctx
,
kubernetesProvider
.
GetPodWatcher
(
ctx
),
podRegex
)
added
,
modified
,
removed
,
errorChan
:=
kubernetes
.
FilteredWatch
(
ctx
,
kubernetesProvider
.
GetPodWatcher
(
ctx
),
podRegex
)
for
{
select
{
case
newTarget
:=
<-
added
:
...
...
@@ -45,6 +45,9 @@ func watchPodsForTapping(ctx context.Context, kubernetesProvider *kubernetes.Pro
case
removedTarget
:=
<-
removed
:
fmt
.
Printf
(
"-%s
\n
"
,
removedTarget
.
Name
)
case
<-
modified
:
continue
case
<-
errorChan
:
cancel
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help