From 37aca255931ccb4bc35dc3bd0f32f8e8ada24e6e Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 13 Feb 2021 18:19:57 +0000 Subject: Add PipeListenerDialer.DialContextAddr Makes it easier to use with grpc.WithContextDialer. --- pipeln.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pipeln.go') diff --git a/pipeln.go b/pipeln.go index 8ff6a62..507ab33 100644 --- a/pipeln.go +++ b/pipeln.go @@ -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{})} } -- cgit v1.2.3-70-g09d2