code: func ToProtoMsgChan(ch chan ProtoMessage, opts ...interface{}) func(ProtoMessage) {
  
  	timeout, logger := ParseOpts(opts...)
  
  	return func(msg ProtoMessage) {
  		select {
  		case ch <- msg:
  		case <-time.After(timeout):
  			logger.Warn("Unable to deliver message")
  		}
  	}
  }
docs: // ToProtoMsgChan allows to receive messages through channel instead of callback.