Get implements Reader.
(ctx context.Context, key client.ObjectKey, out client.Object, opts ...client.GetOption)
| 63 | |
| 64 | // Get implements Reader. |
| 65 | func (ic *informerCache) Get(ctx context.Context, key client.ObjectKey, out client.Object, opts ...client.GetOption) error { |
| 66 | gvk, err := apiutil.GVKForObject(out, ic.scheme) |
| 67 | if err != nil { |
| 68 | return err |
| 69 | } |
| 70 | |
| 71 | started, cache, err := ic.getInformerForKind(ctx, gvk, out) |
| 72 | if err != nil { |
| 73 | return err |
| 74 | } |
| 75 | |
| 76 | if !started { |
| 77 | return &ErrCacheNotStarted{} |
| 78 | } |
| 79 | return cache.Reader.Get(ctx, key, out, opts...) |
| 80 | } |
| 81 | |
| 82 | // List implements Reader. |
| 83 | func (ic *informerCache) List(ctx context.Context, out client.ObjectList, opts ...client.ListOption) error { |
nothing calls this directly
no test coverage detected