code: func (d *RecordDecoder) Type(rec []byte) RecordType {
  	if len(rec) < 1 {
  		return RecordInvalid
  	}
  	switch t := RecordType(rec[0]); t {
  	case RecordSeries, RecordSamples, RecordTombstones:
  		return t
  	}
  	return RecordInvalid
  }
docs: // Type returns the type of the record.
  // Return RecordInvalid if no valid record type is found.