Documentation ¶
Index ¶
- Variables
- type ConsumeHandler
- type Kafka
- func (this *Kafka) AsyncProduce(topic, data string) (err error)
- func (this *Kafka) Close()
- func (this *Kafka) ConsumeGroup(ctx context.Context, group string, topic []string, handler ConsumeHandler)
- func (this *Kafka) ConsumeNewest(ctx context.Context, topic string, handler ConsumeHandler)
- func (this *Kafka) ConsumeOldest(ctx context.Context, topic string, handler ConsumeHandler)
- func (this *Kafka) ConsumePartitionNewest(ctx context.Context, topic string, partition int32, handler ConsumeHandler)
- func (this *Kafka) ConsumePartitionOldest(ctx context.Context, topic string, partition int32, handler ConsumeHandler)
- func (this *Kafka) Produce(topic, data string) (partition int32, offset int64, err error)
- type Options
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConsumeHandler ¶
type ConsumeHandler func(msg *sarama.ConsumerMessage) error
type Kafka ¶
type Kafka struct {
// contains filtered or unexported fields
}
func (*Kafka) AsyncProduce ¶
func (*Kafka) ConsumeGroup ¶
func (*Kafka) ConsumeNewest ¶
func (this *Kafka) ConsumeNewest(ctx context.Context, topic string, handler ConsumeHandler)
func (*Kafka) ConsumeOldest ¶
func (this *Kafka) ConsumeOldest(ctx context.Context, topic string, handler ConsumeHandler)
func (*Kafka) ConsumePartitionNewest ¶
func (*Kafka) ConsumePartitionOldest ¶
Click to show internal directories.
Click to hide internal directories.