module: Revise how inline definition arguments are handled

Stop using weird hacks and just pass them to the module, they are
assumed to be aware of inline definition logic anyway.
This commit is contained in:
fox.cpp 2019-09-20 18:52:18 +03:00
parent 005a6b51d5
commit 1edd031f6a
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
15 changed files with 55 additions and 41 deletions

View file

@ -112,7 +112,10 @@ type QueueMetadata struct {
DSN bool
}
func NewQueue(_, instName string, _ []string) (module.Module, error) {
func NewQueue(_, instName string, _, inlineArgs []string) (module.Module, error) {
if len(inlineArgs) != 0 {
return nil, errors.New("queue: inline arguments are not used")
}
return &Queue{
name: instName,
initialRetryTime: 15 * time.Minute,