MCPcopy
hub / github.com/IBM/sarama / StringEncoder

TypeAlias StringEncoder

utils.go:76–76  ·  view source on GitHub ↗

make strings and byte slices encodable for convenience so they can be used as keys and/or values in kafka messages StringEncoder implements the Encoder interface for Go strings so that they can be used as the Key or Value in a ProducerMessage.

Source from the content-addressed store, hash-verified

74// StringEncoder implements the Encoder interface for Go strings so that they can be used
75// as the Key or Value in a ProducerMessage.
76type StringEncoder string
77
78func (s StringEncoder) Encode() ([]byte, error) {
79 return []byte(s), nil

Calls

no outgoing calls

Tested by

no test coverage detected