server.New signature changes and test fixes. (#324)

* ctx middleware should always be the first added to router

* plugable enqueue func, changed server.New signature

* fix tests

* remove ctx/ctx.Done from server
This commit is contained in:
Pedro Nasser
2016-11-21 14:11:01 -02:00
committed by C Cirello
parent bc0f0c8b42
commit 0343c4990c
9 changed files with 52 additions and 58 deletions

View File

@@ -51,4 +51,4 @@ type MessageQueue interface {
Delete(context.Context, *Task) error
}
type Enqueue func(*Task) (*Task, error)
type Enqueue func(context.Context, MessageQueue, *Task) (*Task, error)