Skip to content

Commit

Permalink
add support func NewConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
vetcher committed Oct 25, 2018
1 parent 76d4e0e commit 1f7b27a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conn/dialers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ func ConfigConnector(url string, config amqp.Config, opts ...ConnectionOption) C
return DialConfig(url, config, opts...)
}
}

func NewConnector(url string, opts ...ConnectionOption) Connector {
return func() (*Connection, error) {
return Connect(url, opts...), nil
}
}

0 comments on commit 1f7b27a

Please sign in to comment.