File: queue.go

package info (click to toggle)
golang-github-neowaylabs-wabbit 0.0~git20180530.0.d089945-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 268 kB
  • sloc: sh: 24; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package amqp

import "github.com/streadway/amqp"

// Queue is a wrapper for "streadway/amqp".Queue but implementing
// the wabbit.Queue interface.
type Queue struct {
	*amqp.Queue
}

// Messages returns the count of messages not awaiting acknowledgment
func (q *Queue) Messages() int {
	return q.Queue.Messages
}

// Name of the queue
func (q *Queue) Name() string {
	return q.Queue.Name
}

// Consumers returns the amount of consumers of this queue
func (q *Queue) Consumers() int {
	return q.Queue.Consumers
}