Documentation ¶
Index ¶
- Constants
- func BytesToString(b *[]byte) *string
- type AmqpClient
- type Channel
- func (chn *Channel) Connect(p *Properties) (err error)
- func (chn *Channel) Create(queueName, exchange, key, kind string) error
- func (chn *Channel) CreateFanout(queueName, exchange string) error
- func (chn *Channel) PublishDirect(exchange, queueName, mgsConnect, key string) error
- func (chn *Channel) PublishFanout(exchange, mgsConnect string) error
- func (chn *Channel) Push(exchange, key, expiration, mgsConnect string) error
- func (chn *Channel) Receive(queueName string) (<-chan amqp.Delivery, error)
- func (chn *Channel) ReceiveFanout(queueName, exchange string) (*string, error)
- type NewChannel
- type Properties
Constants ¶
View Source
const Profile = "amqp"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
func (*Channel) Connect ¶
func (chn *Channel) Connect(p *Properties) (err error)
func (*Channel) Create ¶ added in v1.3.0
func (*Channel) CreateFanout ¶ added in v1.3.0
CreateFanout 创建Fanout类型的队列
func (*Channel) PublishDirect ¶
func (*Channel) PublishFanout ¶
func (*Channel) Push ¶ added in v1.3.0
func (*Channel) Receive ¶
type Properties ¶ added in v1.3.0
type Properties struct { at.ConfigurationProperties `value:"amqp"` Port int `json:"port" default:"5672"` Username string `json:"username" default:"guest"` Password string `json:"password" default:"guest"` Host string `json:"host" default:"127.0.0.1"` QueueName string `json:"queueName" default:"my-queue"` Exchange string `json:"exchange" default:"my-exchange"` SleepTime int64 `json:"sleepTime" default:"3*1e9"` }
Click to show internal directories.
Click to hide internal directories.