serializer.go 393 B

1234567891011121314151617181920
  1. package sarama
  2. type serializer struct {
  3. config *Config
  4. }
  5. type Serializer interface {
  6. Serialize(msg *ProducerMessage) (*ProducerMessage, error)
  7. }
  8. func NewSerializer(config *Config) (*serializer, error) {
  9. serializer := &serializer{
  10. config: config,
  11. }
  12. return serializer, nil
  13. }
  14. func (serializer *serializer) Serialize(msg *ProducerMessage) (*ProducerMessage, error) {
  15. return msg, nil
  16. }