(opts metav1.ListOptions)
| 258 | } |
| 259 | |
| 260 | func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { |
| 261 | result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() |
| 262 | if err := result.Error(); err != nil { |
| 263 | return nil, err |
| 264 | } |
| 265 | retBytes, err := result.Raw() |
| 266 | if err != nil { |
| 267 | return nil, err |
| 268 | } |
| 269 | uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) |
| 270 | if err != nil { |
| 271 | return nil, err |
| 272 | } |
| 273 | if list, ok := uncastObj.(*unstructured.UnstructuredList); ok { |
| 274 | return list, nil |
| 275 | } |
| 276 | |
| 277 | list, err := uncastObj.(*unstructured.Unstructured).ToList() |
| 278 | if err != nil { |
| 279 | return nil, err |
| 280 | } |
| 281 | return list, nil |
| 282 | } |
| 283 | |
| 284 | func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { |
| 285 | internalGV := schema.GroupVersions{ |
nothing calls this directly
no test coverage detected