INNER CODE UNIT · Go

DialContext

pace/bricks · grpc/client.go:24

func DialContext(_ context.Context, addr string) (*grpc.ClientConn, error) {
	return NewClient(addr)
}

// Deprecated: Use NewClient instead.
func Dial(addr string) (*grpc.ClientConn, error) {
	return NewClient(addr)
}

func NewClient(addr string) (*grpc.ClientConn, error) {
	var conn *grpc.ClientConn

	clientMetrics := grpc_prometheus.NewClientMetrics()

	opts := []grpc_retry.CallOption{
		grpc_retry.WithBackoff(grpc_retry.BackoffLinear(100 * time.Millisecond)),
		grpc_retry.WithMax(10),
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…