@@ -51,7 +51,7 @@ type informerCache struct {
5151}
5252
5353// Get implements Reader
54- func (ip * informerCache ) Get (ctx context.Context , key client.ObjectKey , out runtime .Object ) error {
54+ func (ip * informerCache ) Get (ctx context.Context , key client.ObjectKey , out client .Object ) error {
5555 gvk , err := apiutil .GVKForObject (out , ip .Scheme )
5656 if err != nil {
5757 return err
@@ -69,7 +69,7 @@ func (ip *informerCache) Get(ctx context.Context, key client.ObjectKey, out runt
6969}
7070
7171// List implements Reader
72- func (ip * informerCache ) List (ctx context.Context , out runtime. Object , opts ... client.ListOption ) error {
72+ func (ip * informerCache ) List (ctx context.Context , out client. ObjectList , opts ... client.ListOption ) error {
7373
7474 gvk , cacheTypeObj , err := ip .objectTypeForListObject (out )
7575 if err != nil {
@@ -91,7 +91,7 @@ func (ip *informerCache) List(ctx context.Context, out runtime.Object, opts ...c
9191// objectTypeForListObject tries to find the runtime.Object and associated GVK
9292// for a single object corresponding to the passed-in list type. We need them
9393// because they are used as cache map key.
94- func (ip * informerCache ) objectTypeForListObject (list runtime. Object ) (* schema.GroupVersionKind , runtime.Object , error ) {
94+ func (ip * informerCache ) objectTypeForListObject (list client. ObjectList ) (* schema.GroupVersionKind , runtime.Object , error ) {
9595 gvk , err := apiutil .GVKForObject (list , ip .Scheme )
9696 if err != nil {
9797 return nil , nil , err
@@ -146,7 +146,7 @@ func (ip *informerCache) GetInformerForKind(ctx context.Context, gvk schema.Grou
146146}
147147
148148// GetInformer returns the informer for the obj
149- func (ip * informerCache ) GetInformer (ctx context.Context , obj runtime .Object ) (Informer , error ) {
149+ func (ip * informerCache ) GetInformer (ctx context.Context , obj client .Object ) (Informer , error ) {
150150 gvk , err := apiutil .GVKForObject (obj , ip .Scheme )
151151 if err != nil {
152152 return nil , err
@@ -170,7 +170,7 @@ func (ip *informerCache) NeedLeaderElection() bool {
170170// to List. For one-to-one compatibility with "normal" field selectors, only return one value.
171171// The values may be anything. They will automatically be prefixed with the namespace of the
172172// given object, if present. The objects passed are guaranteed to be objects of the correct type.
173- func (ip * informerCache ) IndexField (ctx context.Context , obj runtime .Object , field string , extractValue client.IndexerFunc ) error {
173+ func (ip * informerCache ) IndexField (ctx context.Context , obj client .Object , field string , extractValue client.IndexerFunc ) error {
174174 informer , err := ip .GetInformer (ctx , obj )
175175 if err != nil {
176176 return err
@@ -181,7 +181,7 @@ func (ip *informerCache) IndexField(ctx context.Context, obj runtime.Object, fie
181181func indexByField (indexer Informer , field string , extractor client.IndexerFunc ) error {
182182 indexFunc := func (objRaw interface {}) ([]string , error ) {
183183 // TODO(directxman12): check if this is the correct type?
184- obj , isObj := objRaw .(runtime .Object )
184+ obj , isObj := objRaw .(client .Object )
185185 if ! isObj {
186186 return nil , fmt .Errorf ("object of type %T is not an Object" , objRaw )
187187 }
0 commit comments