Documentation ¶
Index ¶
- func CheckLogger(t *testing.T, buf fmt.Stringer)
- func NewTestLogger() (*bytes.Buffer, *logrus.Entry)
- type NoopAcknowledger
- type TestDB
- func (t *TestDB) Delete(job *api.Job) error
- func (t *TestDB) Get(id string) (*api.Job, error)
- func (t *TestDB) GetList(page, perPage int) ([]*api.Job, error)
- func (t *TestDB) GetListByStatus(status string, page, perPage int) ([]*api.Job, error)
- func (t *TestDB) GetUUIDs(jobs []*api.Job) (ids []string)
- func (t *TestDB) Save(job *api.Job) error
- type TestQueue
- func (t *TestQueue) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, ...) (<-chan amqp.Delivery, error)
- func (t *TestQueue) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
- func (t *TestQueue) Qos(prefetchCount, prefetchSize int, global bool) error
- func (t *TestQueue) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLogger ¶
CheckLogger checks the output for errors and fatals
Types ¶
type NoopAcknowledger ¶
type NoopAcknowledger struct{}
NoopAcknowledger doesn't really do something.
func (*NoopAcknowledger) Ack ¶
func (a *NoopAcknowledger) Ack(tag uint64, multiple bool) error
Ack doesn't do something.
type TestDB ¶
TestDB is a db implementation used for testing
func (*TestDB) GetListByStatus ¶
GetListByStatus returns all jobs withing the Jobs field
type TestQueue ¶
TestQueue for tests which buffers the messages
func (*TestQueue) Consume ¶
func (t *TestQueue) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
Consume just pushes all messages from the Messages field into the channel.
func (*TestQueue) Publish ¶
func (t *TestQueue) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
Publish adds the given message to the Messages field.
Click to show internal directories.
Click to hide internal directories.