type Decoder … type Reporter … type StreamWatcher … // NewStreamWatcher creates a StreamWatcher from the given decoder. func NewStreamWatcher(d Decoder, r Reporter) *StreamWatcher { … } // ResultChan implements Interface. func (sw *StreamWatcher) ResultChan() <-chan Event { … } // Stop implements Interface. func (sw *StreamWatcher) Stop() { … } // receive reads result from the decoder in a loop and sends down the result channel. func (sw *StreamWatcher) receive() { … }