rabbitmq

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *Config
	Ch     *amqp.Channel
	Queue  *amqp.Queue

	//消费者读取消息
	MsgCh chan []byte
}

func New

func New(cfg *Config) (*Client, error)

func (*Client) Read

func (c *Client) Read() chan []byte

Read 读取消息

func (*Client) Send

func (c *Client) Send(content string) error

Send 发送消息

type Config

type Config struct {
	Username string
	Password string
	Host     string
	Port     int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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