amqptest/server/queue.go
raw| 1 | package server |
| 2 | |
| 3 | import "github.com/NeowayLabs/wabbit" |
| 4 | |
| 5 | const ( |
| 6 | QueueMaxLen = 2 << 8 |
| 7 | ) |
| 8 | |
| 9 | type Queue struct { |
| 10 | name string |
| 11 | data chan wabbit.Delivery |
| 12 | } |
| 13 | |
| 14 | func NewQueue(name string) *Queue { |
| 15 | return &Queue{ |
| 16 | name: name, |
| 17 | data: make(chan wabbit.Delivery, QueueMaxLen), |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | func (q *Queue) Consumers() int { |
| 22 | return 0 |
| 23 | } |
| 24 | |
| 25 | func (q *Queue) Name() string { |
| 26 | return q.name |
| 27 | } |
| 28 | |
| 29 | func (q *Queue) Messages() int { |
| 30 | return 0 |
| 31 | } |