Watch attempts to begin watching the requested location. Returns a watch.Interface, or an error.
()
| 534 | // Watch attempts to begin watching the requested location. |
| 535 | // Returns a watch.Interface, or an error. |
| 536 | func (r *Request) Watch() (watch.Interface, error) { |
| 537 | return r.WatchWithSpecificDecoders( |
| 538 | func(body io.ReadCloser) streaming.Decoder { |
| 539 | framer := r.serializers.Framer.NewFrameReader(body) |
| 540 | return streaming.NewDecoder(framer, r.serializers.StreamingSerializer) |
| 541 | }, |
| 542 | r.serializers.Decoder, |
| 543 | ) |
| 544 | } |
| 545 | |
| 546 | // WatchWithSpecificDecoders attempts to begin watching the requested location with a *different* decoder. |
| 547 | // Turns out that you want one "standard" decoder for the watch event and one "personal" decoder for the content |