Last active
February 15, 2018 15:03
-
-
Save slok/decf0e81fba3023e33e977dc8f5bdb51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create our retriever so the controller knows how to get/listen for pod events. | |
retr := &retrieve.Resource{ | |
Object: &corev1.Pod{}, | |
ListerWatcher: &cache.ListWatch{ | |
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { | |
return k8scli.CoreV1().Pods("").List(options) | |
}, | |
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { | |
return k8scli.CoreV1().Pods("").Watch(options) | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment