mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-05-01 00:00:03 +08:00
Update sharedInformerFactoryInterface context initialization example
Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com> Kubernetes-commit: ef1878c6013f44a4b5a8800033c73551ea77c91f
This commit is contained in:
committed by
Kubernetes Publisher
parent
456925b454
commit
e0c4511c56
@@ -205,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal
|
||||
//
|
||||
// It is typically used like this:
|
||||
//
|
||||
// ctx, cancel := context.Background()
|
||||
// ctx, cancel := context.WithCancel(context.Background())
|
||||
// defer cancel()
|
||||
// factory := NewSharedInformerFactory(client, resyncPeriod)
|
||||
// defer factory.WaitForStop() // Returns immediately if nothing was started.
|
||||
|
||||
Reference in New Issue
Block a user