Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSyncReadEventConsumer ¶
type BatchSyncReadEventConsumer struct {
// contains filtered or unexported fields
}
BatchSyncReadEventConsumer 批量消费者
func NewBatchSyncReadEventConsumer ¶
func NewBatchSyncReadEventConsumer(client sarama.Client, repo domain.InteractionRepository) *BatchSyncReadEventConsumer
func (*BatchSyncReadEventConsumer) Consumer ¶
func (c *BatchSyncReadEventConsumer) Consumer(msg []*sarama.ConsumerMessage, event []ReadEvent) error
func (*BatchSyncReadEventConsumer) ConsumerV1 ¶
func (c *BatchSyncReadEventConsumer) ConsumerV1(msg *sarama.ConsumerMessage, event ReadEvent) error
func (*BatchSyncReadEventConsumer) Start ¶
func (c *BatchSyncReadEventConsumer) Start() error
type FeedEvent ¶
type FeedEvent struct { Type string // 内部定义,分发给不同业务方 MetaData domain.FeedContent // 业务方具体的数据 }
type FeedEventConsumer ¶
type FeedEventConsumer struct {
// contains filtered or unexported fields
}
func NewFeedEventConsumer ¶
func NewFeedEventConsumer(client sarama.Client, feedUsecase domain.FeedUsecase) *FeedEventConsumer
func (*FeedEventConsumer) Consume ¶
func (f *FeedEventConsumer) Consume(msg *sarama.ConsumerMessage, event FeedEvent) error
type SyncReadEventConsumer ¶
type SyncReadEventConsumer struct {
// contains filtered or unexported fields
}
SyncReadEventConsumer 消费者
func NewSyncReadEventConsumer ¶
func NewSyncReadEventConsumer(client sarama.Client, repo domain.InteractionRepository) *SyncReadEventConsumer
func (*SyncReadEventConsumer) Consumer ¶
func (c *SyncReadEventConsumer) Consumer(msg *sarama.ConsumerMessage, event ReadEvent) error
func (*SyncReadEventConsumer) Start ¶
func (c *SyncReadEventConsumer) Start() error
type SyncReadEventProducer ¶
type SyncReadEventProducer struct {
// contains filtered or unexported fields
}
SyncReadEventProducer 生产者
func NewSyncProducer ¶
func NewSyncProducer(producer sarama.SyncProducer) *SyncReadEventProducer
func (SyncReadEventProducer) ProduceReadEvent ¶
func (s SyncReadEventProducer) ProduceReadEvent(c context.Context, event ReadEvent) error
Click to show internal directories.
Click to hide internal directories.