From 7bb12ec27e75c353fee12a46dbcf9225e6577f8a Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Wed, 31 May 2023 21:36:52 -0500 Subject: [PATCH] Update grpc_broker.go --- grpc_broker.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/grpc_broker.go b/grpc_broker.go index 9bf56776..242106fd 100644 --- a/grpc_broker.go +++ b/grpc_broker.go @@ -367,7 +367,10 @@ func (b *GRPCBroker) Close() error { } // Dial opens a connection by ID. -func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) { +func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) { return b.DialWithOptions(id) } + +// Dial opens a connection by ID with options. +func (b *GRPCBroker) DialWithOptions(id uint32, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error) { var c *plugin.ConnInfo // Open the stream @@ -392,7 +395,7 @@ func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) { return nil, err } - return dialGRPCConn(b.tls, netAddrDialer(addr)) + return dialGRPCConn(b.tls, netAddrDialer(addr), opts...) } // NextId returns a unique ID to use next.