feat(protocol): allow override of dial func
This commit is contained in:
@ -16,6 +16,7 @@ const compatibleVersionConstraint = "^2.24"
|
||||
|
||||
type Protocol struct {
|
||||
logger logger.Logger
|
||||
dial protocol.DialFunc
|
||||
}
|
||||
|
||||
// Available implements protocol.Protocol.
|
||||
@ -59,7 +60,7 @@ func (p *Protocol) Identifier() protocol.Identifier {
|
||||
|
||||
// Operations implements protocol.Protocol.
|
||||
func (p *Protocol) Operations(addr string) protocol.Operations {
|
||||
return &Operations{addr: addr, logger: p.logger}
|
||||
return &Operations{addr: addr, logger: p.logger, dial: p.dial}
|
||||
}
|
||||
|
||||
var _ protocol.Protocol = &Protocol{}
|
||||
|
Reference in New Issue
Block a user