event

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncTopic = "sync_data_to_search"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncConsumer

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

func NewSyncConsumer

func NewSyncConsumer(svc service.SyncService, q mq.MQ) (*SyncConsumer, error)

func (*SyncConsumer) Consume

func (s *SyncConsumer) Consume(ctx context.Context) error

func (*SyncConsumer) Start

func (s *SyncConsumer) Start(ctx context.Context)

func (*SyncConsumer) Stop

func (s *SyncConsumer) Stop(_ context.Context) error

type SyncEvent

type SyncEvent struct {
	Biz   string `json:"biz"`
	BizID int    `json:"bizID"`
	// 具体内容
	Data string `json:"data"`
}

Jump to

Keyboard shortcuts

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