type Decoder … // NewDecoder creates an Decoder for the given writer and codec. func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Decoder { … } // Decode blocks until it can return the next object in the reader. Returns an error // if the reader is closed or an object can't be decoded. func (d *Decoder) Decode() (watch.EventType, runtime.Object, error) { … } // Close closes the underlying r. func (d *Decoder) Close() { … }