func (as *Proto) Name() string {
	return ProtoContentType
}
Name implements Serializer.Name
package serialization
import (
	"fmt"
	"reflect"
	"sync"
	"github.com/golang/protobuf/proto"
	"github.com/sirupsen/logrus"
	"github.com/wework/grabbit/gbus"
)
var _ gbus.Serializer = &Proto{}
const ProtoContentType = "application/x-protobuf"
type Proto struct {
	lock              *sync.Mutex
	registeredSchemas map[string]reflect.Type
	logger            logrus.FieldLogger
}
func NewProtoSerializer(logger logrus.FieldLogger) gbus.Serializer {
	return &Proto{
		registeredSchemas: make(map[string]reflect.Type),
		lock:              &sync.Mutex{},
		logger:            logger.WithField("serializer", "proto"),
	}
}