Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a high-level Queue using the RabbitMQ backend. @group Constructors
Example: rabbitmq shorthand constructor
q, err := rabbitmqqueue.New(
"amqp://guest:guest@127.0.0.1:5672/",
queue.WithWorkers(4), // optional; default: runtime.NumCPU() (min 1)
)
if err != nil {
return
}
_ = q
func NewWithConfig ¶
NewWithConfig creates a high-level Queue using an explicit RabbitMQ driver config. @group Constructors
Example: rabbitmq config constructor
q, err := rabbitmqqueue.NewWithConfig(
rabbitmqqueue.Config{
DriverBaseConfig: queueconfig.DriverBaseConfig{
DefaultQueue: "critical", // default if empty: "default"
Observer: nil, // default: nil
},
URL: "amqp://guest:guest@127.0.0.1:5672/", // required
},
queue.WithWorkers(4), // optional; default: runtime.NumCPU() (min 1)
)
if err != nil {
return
}
_ = q
Types ¶
type Config ¶
type Config struct {
queueconfig.DriverBaseConfig
URL string
}
Config configures the RabbitMQ driver module constructor.
Click to show internal directories.
Click to hide internal directories.