mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-05 09:01:06 +00:00
1. Fix lint errors for the whole directory staging/src/k8s.io/client-go/tools/cache;
2. Remove staging/src/k8s.io/client-go/tools/cache from .golint_failures; 3. Fix some typo from comments. Kubernetes-commit: 0e0e1f7daba0a6ae6dd59df0a1bb643c323ad8cb
This commit is contained in:
committed by
Kubernetes Publisher
parent
579ad46bdc
commit
2b8d87c082
6
tools/cache/mutation_detector.go
vendored
6
tools/cache/mutation_detector.go
vendored
@@ -36,12 +36,14 @@ func init() {
|
||||
mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR"))
|
||||
}
|
||||
|
||||
type CacheMutationDetector interface {
|
||||
// MutationDetector is able to monitor if the object be modified outside.
|
||||
type MutationDetector interface {
|
||||
AddObject(obj interface{})
|
||||
Run(stopCh <-chan struct{})
|
||||
}
|
||||
|
||||
func NewCacheMutationDetector(name string) CacheMutationDetector {
|
||||
// NewCacheMutationDetector creates a new instance for the defaultCacheMutationDetector.
|
||||
func NewCacheMutationDetector(name string) MutationDetector {
|
||||
if !mutationDetectionEnabled {
|
||||
return dummyMutationDetector{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user