article

package
v0.0.0-...-d13da26 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryReadEventConsumer

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

func (*HistoryReadEventConsumer) Consume

Consume 这个不是幂等的

func (*HistoryReadEventConsumer) Start

func (r *HistoryReadEventConsumer) Start() error

type InteractiveReadEventBatchConsumer

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

func (*InteractiveReadEventBatchConsumer) Consume

Consume 这个不是幂等的

func (*InteractiveReadEventBatchConsumer) Start

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 如果你有复杂的重试逻辑,就用装饰器 你认为你的重试逻辑很简单,你就放这里

func (*KafkaProducer) ProduceReadEventV1

func (k *KafkaProducer) ProduceReadEventV1(ctx context.Context, v1 ReadEventV1)

type Producer

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

func NewKafkaProducer

func NewKafkaProducer(pc sarama.SyncProducer) Producer

type ReadEvent

type ReadEvent struct {
	Uid int64
	Aid int64
}

type ReadEventV1

type ReadEventV1 struct {
	Uids []int64
	Aids []int64
}

Jump to

Keyboard shortcuts

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