(opts metav1.ListOptions)
| 282 | } |
| 283 | |
| 284 | func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { |
| 285 | internalGV := schema.GroupVersions{ |
| 286 | {Group: c.resource.Group, Version: runtime.APIVersionInternal}, |
| 287 | // always include the legacy group as a decoding target to handle non-error `Status` return types |
| 288 | {Group: "", Version: runtime.APIVersionInternal}, |
| 289 | } |
| 290 | s := &rest.Serializers{ |
| 291 | Encoder: watchNegotiatedSerializerInstance.EncoderForVersion(watchJsonSerializerInfo.Serializer, c.resource.GroupVersion()), |
| 292 | Decoder: watchNegotiatedSerializerInstance.DecoderToVersion(watchJsonSerializerInfo.Serializer, internalGV), |
| 293 | |
| 294 | RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { |
| 295 | return watchNegotiatedSerializerInstance.DecoderToVersion(watchJsonSerializerInfo.Serializer, internalGV), nil |
| 296 | }, |
| 297 | StreamingSerializer: watchJsonSerializerInfo.StreamSerializer.Serializer, |
| 298 | Framer: watchJsonSerializerInfo.StreamSerializer.Framer, |
| 299 | } |
| 300 | |
| 301 | wrappedDecoderFn := func(body io.ReadCloser) streaming.Decoder { |
| 302 | framer := s.Framer.NewFrameReader(body) |
| 303 | return streaming.NewDecoder(framer, s.StreamingSerializer) |
| 304 | } |
| 305 | |
| 306 | opts.Watch = true |
| 307 | return c.client.client.Get().AbsPath(c.makeURLSegments("")...). |
| 308 | SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). |
| 309 | WatchWithSpecificDecoders(wrappedDecoderFn, unstructured.UnstructuredJSONScheme) |
| 310 | } |
| 311 | |
| 312 | func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { |
| 313 | if len(name) == 0 { |
nothing calls this directly
no test coverage detected