Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConsumerConfig ¶
Types ¶
type Balancer ¶ added in v0.2.0
type Balancer struct{}
func (Balancer) AssignGroups ¶ added in v0.2.0
func (r Balancer) AssignGroups(members []kafka.GroupMember, topicPartitions []kafka.Partition) kafka.GroupMemberAssignments
func (Balancer) ProtocolName ¶ added in v0.2.0
type KafkaPublisher ¶
type KafkaPublisher interface { Publish(ctx context.Context, messages ...kafka.Message) error PublishMetric(ctx context.Context, topic, measurement string, tags map[string]string, fields map[string]interface{}, tm time.Time) error Close() error }
func NewKafkaPublisher ¶
func NewKafkaPublisher(brokers []string) KafkaPublisher
type KafkaSubscriber ¶
type KafkaSubscriber interface { Subscribe(ctx context.Context, onMessage OnKafkaMessage) error Close() error }
func NewKafkaSubscriber ¶
func NewKafkaSubscriber(config kafka.ReaderConfig) KafkaSubscriber
type OnKafkaMessage ¶
type OnKafkaMessage func(message kafka.Message)
Click to show internal directories.
Click to hide internal directories.