Difference between NewIndexerInformer and NewSharedIndexInformer

5/22/2019

I have a question regarding the difference between NewIndexerInformer and NewSharedIndexInformer as I would like to use NewSharedIndexInformer instead NewIndexerInformer

https://github.com/kubernetes/client-go/blob/master/tools/cache/shared_informer.go#L132 and

https://github.com/kubernetes/client-go/blob/master/tools/cache/controller.go#L307

in NewIndexerInformer I pass the ResourceEventHandler but in NewSharedIndexInformer I cannot, this means I don't need to specify events of creation, deletion, etc?

I am doing the following https://pastebin.com/kqvQpDLU in line 226 and 251

Thanks in advance

-- Iago Santos
go
kubernetes
kubernetes-go-client

0 Answers