Skip to content

Commit b09c1ce

Browse files
AdirioIK-Adrian
authored andcommitted
Add newInformer documentation
Signed-off-by: Adrián Orive <[email protected]>
1 parent b6c3129 commit b09c1ce

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

staging/src/k8s.io/client-go/tools/cache/controller.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,20 @@ func NewIndexerInformer(
317317
return clientState, newInformer(lw, objType, resyncPeriod, h, clientState)
318318
}
319319

320+
// newInformer returns a controller for populating the store while also
321+
// providing event notifications.
322+
//
323+
// Parameters
324+
// * lw is list and watch functions for the source of the resource you want to
325+
// be informed of.
326+
// * objType is an object of the type that you expect to receive.
327+
// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate
328+
// calls, even if nothing changed). Otherwise, re-list will be delayed as
329+
// long as possible (until the upstream source closes the watch or times out,
330+
// or you stop the controller).
331+
// * h is the object you want notifications sent to.
332+
// * clientState is the store you want to populate
333+
//
320334
func newInformer(
321335
lw ListerWatcher,
322336
objType runtime.Object,

0 commit comments

Comments
 (0)