mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-08 18:39:16 +00: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
17baf3d705
commit
302eac9149
@@ -224,7 +224,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