message_queue

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Copyright 2019 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (
	TopicSendEmail  Topic       = "send_email"
	ChanelSendEmail Chanel      = "send_email"
	Address         string      // 消息队列地址
	Config          *nsq.Config // 消息队列的配置
)

Functions

func CreateConsumer

func CreateConsumer(topic Topic, channel Chanel, handler nsq.Handler) (c *nsq.Consumer, err error)

创建消费者

func Publish

func Publish(topic Topic, message []byte) (err error)

发布消息

func RunMessageQueueConsumer

func RunMessageQueueConsumer()

Types

type Chanel

type Chanel string

type SendActivationEmailBody

type SendActivationEmailBody struct {
	Email string `json:"email"` // 要发送的邮箱
	Code  string `json:"code"`  // 发送的激活码
}

type Topic

type Topic string

Jump to

Keyboard shortcuts

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