article

package
v0.0.0-...-6ea431b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InteractiveReadEventConsumer

type InteractiveReadEventConsumer struct {
	// contains filtered or unexported fields
}

func (*InteractiveReadEventConsumer) Consume

Consume 这个不是幂等的

func (*InteractiveReadEventConsumer) Start

type KafkaProducer

type KafkaProducer struct {
	// contains filtered or unexported fields
}

func (*KafkaProducer) ProduceReadEvent

func (k *KafkaProducer) ProduceReadEvent(ctx context.Context, evt ReadEvent) error

ProduceReadEvent 如果你有复杂的重试逻辑,就用装饰器 你认为你的重试逻辑很简单,你就放这里

type Producer

type Producer interface {
	ProduceReadEvent(ctx context.Context, evt ReadEvent) error
}

func NewKafkaProducer

func NewKafkaProducer(pc sarama.SyncProducer) Producer

type ReadEvent

type ReadEvent struct {
	Uid int64
	Aid int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL