mq

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 7 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 {
	Connection *amqp.Connection
	Channel    *amqp.Channel
	// contains filtered or unexported fields
}

func New added in v2.0.9

func New(cfg *Config) Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) PublishJSONMessage added in v2.0.9

func (c *Client) PublishJSONMessage(qName string, msgId string, body []byte) error

func (*Client) PublishMessage added in v2.0.9

func (c *Client) PublishMessage(qName string, msgId string, appId string, userId string, mimeType string, body []byte) error

func (*Client) PublishTextMessage added in v2.0.9

func (c *Client) PublishTextMessage(qName string, msgId string, body []byte) error

func (*Client) QueueDeclare added in v2.0.9

func (c *Client) QueueDeclare(name string) (*amqp.Queue, error)

type Config

type Config struct {
	Host        string
	Port        string
	Username    string
	Password    string
	VirtualHost string
	Exchange    string
}

Jump to

Keyboard shortcuts

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