Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteDecoder ¶
type ByteDecoder struct{}
func (ByteDecoder) Decode ¶
func (d ByteDecoder) Decode(b []byte) (interface{}, error)
type ByteEncoder ¶
type ByteEncoder struct{}
func (ByteEncoder) Encode ¶
func (e ByteEncoder) Encode(v interface{}) ([]byte, error)
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
func NewSink ¶
func NewSink(c *SinkConfig) (*Sink, error)
type SinkConfig ¶
type SinkConfig struct {
sarama.Config
Brokers []string
Topic string
KeyEncoder Encoder
ValueEncoder Encoder
BatchSize int
}
func NewSinkConfig ¶
func NewSinkConfig() *SinkConfig
func (*SinkConfig) Validate ¶
func (c *SinkConfig) Validate() error
Validate checks a Config instance. It will return a sarama.ConfigurationError if the specified values don't make sense.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source represents a Kafka stream source.
func NewSource ¶
func NewSource(c *SourceConfig) (*Source, error)
NewSource creates a new Kafka stream source.
type SourceConfig ¶
type SourceConfig struct {
sarama.Config
Brokers []string
Topic string
GroupId string
Ctx context.Context
KeyDecoder Decoder
ValueDecoder Decoder
BufferSize int
}
SourceConfig represents the configuration for a Kafka stream source.
func NewSourceConfig ¶
func NewSourceConfig() *SourceConfig
NewSourceConfig creates a new Kafka source configuration.
func (*SourceConfig) Validate ¶
func (c *SourceConfig) Validate() error
Validate checks a Config instance. It will return a sarama.ConfigurationError if the specified values don't make sense.
type StringDecoder ¶
type StringDecoder struct{}
func (StringDecoder) Decode ¶
func (d StringDecoder) Decode(b []byte) (interface{}, error)
type StringEncoder ¶
type StringEncoder struct{}
func (StringEncoder) Encode ¶
func (e StringEncoder) Encode(v interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.