Merge pull request #708 from sargun/better-docs

Add a little bit of documentation to NotifyPods
This commit is contained in:
Sargun Dhillon
2019-08-08 03:10:15 -07:00
committed by GitHub

View File

@@ -69,9 +69,13 @@ type PodLifecycleHandler interface {
// of pod status updates asynchronously.
type PodNotifier interface {
// NotifyPods instructs the notifier to call the passed in function when
// the pod status changes.
// the pod status changes. It should be called when a pod's status changes.
//
// NotifyPods should not block callers.
// The provided pointer to a Pod is guaranteed to be used in a read-only
// fashion. The provided pod's PodStatus should be up to date when
// this function is called.
//
// NotifyPods will not block callers.
NotifyPods(context.Context, func(*corev1.Pod))
}