m

package
v0.0.0-...-4ebd16b Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Framework

func Framework() (m struct {
	UserSignUp struct {
		Exchange     rab.ExchangeDeclare
		WelcomeEmail QueueAndBind
	}
	DeadLetterHumanIntervention struct {
		Exchange  rab.ExchangeDeclare
		SaveToSQL QueueAndBind
	}
})

func InitDeclareAndBind

func InitDeclareAndBind(mqCh *rab.ProxyChannel) (err error)

func NewConnect

func NewConnect() (conn *rab.ProxyConnection, err error)

func RequeueIncrLimiter

func RequeueIncrLimiter(messageID string, maximum uint) bool

正式项目中请使用 https://github.com/goclub/redis#IncrLimiter 实现

Types

type QueueAndBind

type QueueAndBind struct {
	Queue rab.QueueDeclare
	Bind  rab.QueueBind
}

type SagaCreateOrderMessage

type SagaCreateOrderMessage struct {
	SagaID                         uint64
	AccountID                      uint64 `json:"accountID"`
	SkuID                          uint64 `json:"skuID"`
	InventoryDeductionReplySuccess bool   `json:"inventoryDeductionReplySuccess"`
}

func (*SagaCreateOrderMessage) DecodeDelivery

func (v *SagaCreateOrderMessage) DecodeDelivery(d *amqp.Delivery) error

func (SagaCreateOrderMessage) Publishing

func (v SagaCreateOrderMessage) Publishing() (p amqp.Publishing, err error)

type UserSignupMessage

type UserSignupMessage struct {
	Email string `json:"email"`
}

func (*UserSignupMessage) DecodeDelivery

func (v *UserSignupMessage) DecodeDelivery(d *amqp.Delivery) error

func (UserSignupMessage) Publishing

func (v UserSignupMessage) Publishing() (p amqp.Publishing, err error)

Jump to

Keyboard shortcuts

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