MCPcopy
hub / github.com/kubernetes/client-go / Watch

Method Watch

rest/request.go:536–544  ·  view source on GitHub ↗

Watch attempts to begin watching the requested location. Returns a watch.Interface, or an error.

()

Source from the content-addressed store, hash-verified

534// Watch attempts to begin watching the requested location.
535// Returns a watch.Interface, or an error.
536func (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

Callers 1

TestRequestSetsHeadersFunction · 0.95

Calls 1

Tested by 1

TestRequestSetsHeadersFunction · 0.76