diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-02-13 18:19:57 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-02-13 18:27:46 +0000 |
| commit | 37aca255931ccb4bc35dc3bd0f32f8e8ada24e6e (patch) | |
| tree | 7778dec2446bc1aa1a0009321d826c7cf0bb21bb /pipeln.go | |
| parent | fcc1f852131a7eaf026f172cd54ce6db3b79bc04 (diff) | |
Add PipeListenerDialer.DialContextAddrv0.1.0
Makes it easier to use with grpc.WithContextDialer.
Diffstat (limited to 'pipeln.go')
| -rw-r--r-- | pipeln.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -73,6 +73,10 @@ func (ln *PipeListenerDialer) DialContext(_ context.Context, network, addr strin return ln.Dial(network, addr) } +func (ln *PipeListenerDialer) DialContextAddr(_ context.Context, addr string) (net.Conn, error) { + return ln.Dial("", addr) +} + func New(addr string) *PipeListenerDialer { return &PipeListenerDialer{addr, make(chan net.Conn), make(chan struct{})} } |
