You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/cleaner/cleaner.go
+20-14Lines changed: 20 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ import (
7
7
"os"
8
8
"path/filepath"
9
9
"strings"
10
+
"sync"
10
11
"time"
11
12
12
13
"github.com/deis/builder/pkg/k8s"
13
-
"github.com/deis/builder/pkg/sshd"
14
14
"k8s.io/kubernetes/pkg/api"
15
15
"k8s.io/kubernetes/pkg/fields"
16
16
"k8s.io/kubernetes/pkg/labels"
@@ -20,6 +20,22 @@ const (
20
20
dotGitSuffix=".git"
21
21
)
22
22
23
+
typeRefstruct {
24
+
mut*sync.Mutex
25
+
}
26
+
27
+
funcNewRef() Ref {
28
+
returnRef{mut: new(sync.Mutex)}
29
+
}
30
+
31
+
func (cRef) Lock() {
32
+
c.mut.Lock()
33
+
}
34
+
35
+
func (cRef) Unlock() {
36
+
c.mut.Unlock()
37
+
}
38
+
23
39
// localDirs returns all of the local directories immediately under gitHome that filter returns true for. filter will receive only the names of each of the top level directories (not their fully qualified paths), and should return true if it should be included in the output
// Run starts the deleted app cleaner. Every pollSleepDuration, it compares the result of nsLister.List with the directories in the top level of gitHome on the local file system. On any error, it uses log messages to output a human readable description of what happened.
0 commit comments