receiver/kafka/kafka.go
func (p *Protocol) MarshalText() ([]byte, error) {
	switch *p {
	case ProtocolPlain:
		return []byte("plain"), nil
	case ProtocolProtobuf:
		return []byte("protobuf"), nil
	case ProtocolPickle:
		return []byte("pickle"), nil
	}
	return nil, fmt.Errorf("Unsupported offset type %v, supported offsets: %v", p, supportedProtocols)
}
func (p *Protocol) MarshalText() ([]byte, error) {
	switch *p {
	case ProtocolPlain:
		return []byte("plain"), nil
	case ProtocolProtobuf:
		return []byte("protobuf"), nil
	case ProtocolPickle:
		return []byte("pickle"), nil
	}
	return nil, fmt.Errorf("Unsupported offset type %v, supported offsets: %v", p, supportedProtocols)
}
// MarshalText converts internal enum-like representation of protocol to a text