mq_broker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MqHost     string `json:"Host"`
	MqPort     string `json:"Port"`
	MqUsername string `json:"Username"`
	MqPassword string `json:"Password"`
	// contains filtered or unexported fields
}

func InitConfig

func InitConfig() *Config

func (*Config) Channel

func (c *Config) Channel() (*amqp.Channel, error)

func (*Config) Close

func (c *Config) Close() error

func (*Config) ConsumerChannel

func (c *Config) ConsumerChannel() (*amqp.Channel, *amqp.Connection, error)

func (*Config) DeclareSimpleQueue

func (c *Config) DeclareSimpleQueue(name string) error

func (*Config) GetQueueInfo

func (c *Config) GetQueueInfo(queue string) (*amqp.Queue, error)

func (*Config) Ping

func (c *Config) Ping() bool

func (*Config) PublishJson

func (c *Config) PublishJson(queue string, msg interface{}) error

func (*Config) QueueDeclare

func (c *Config) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (*amqp.Queue, error)

func (*Config) ServerStart

func (c *Config) ServerStart() error

type Error

type Error struct {
	amqp.Error
}

type QInfo

type QInfo struct {
	Messages  int // count of messages not awaiting acknowledgment
	Consumers int // number of consumers receiving deliveries
}

Jump to

Keyboard shortcuts

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