pull/2318/head
skiffer-git 6 months ago
parent fa69040338
commit 28cb3a37fa

@ -49,7 +49,7 @@ func (r *SvcDiscoveryRegistryImpl) GetUserIdHashGatewayHost(ctx context.Context,
} }
func (r *SvcDiscoveryRegistryImpl) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) { func (r *SvcDiscoveryRegistryImpl) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) {
target := fmt.Sprintf("%s:///%s", r.schema, serviceName) target := fmt.Sprintf("%s:///%s", r.schema, serviceName)
conn, err := grpc.DialContext(ctx, target, grpc.WithResolvers(r.resolver)) conn, err := grpc.DialContext(ctx, target, append(append(r.dialOptions, opts...), grpc.WithResolvers(r.resolver))...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -58,7 +58,7 @@ func (r *SvcDiscoveryRegistryImpl) GetConns(ctx context.Context, serviceName str
func (r *SvcDiscoveryRegistryImpl) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error) { func (r *SvcDiscoveryRegistryImpl) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
target := fmt.Sprintf("%s:///%s", r.schema, serviceName) target := fmt.Sprintf("%s:///%s", r.schema, serviceName)
return grpc.DialContext(ctx, target, grpc.WithResolvers(r.resolver)) return grpc.DialContext(ctx, target, append(append(r.dialOptions, opts...), grpc.WithResolvers(r.resolver))...)
} }
func (r *SvcDiscoveryRegistryImpl) GetSelfConnTarget() string { func (r *SvcDiscoveryRegistryImpl) GetSelfConnTarget() string {

Loading…
Cancel
Save