func NewRestyClient(restOption *client.RestOptions) client.RestClient {
	client := resty.New()
	client.SetTransport(
		&http.Transport{
			DialContext: func(_ context.Context, network, addr string) (net.Conn, error) {
				c, err := net.DialTimeout(network, addr, restOption.ConnectTimeout)
				if err != nil {
					return nil, err
				}
				err = c.SetDeadline(time.Now().Add(restOption.RequestTimeout))
				if err != nil {
					return nil, err
				}
				return c, nil
			},
		})
	return &RestyClient{
		client: client,
	}
}
NewRestyClient a constructor of RestyClient
package client_impl
import (
	"context"
	"net"
	"net/http"
	"path"
	"time"
)
import (
	"github.com/go-resty/resty/v2"
	perrors "github.com/pkg/errors"
)
import (
	"dubbo.apache.org/dubbo-go/v3/common/constant"
	"dubbo.apache.org/dubbo-go/v3/common/extension"
	"dubbo.apache.org/dubbo-go/v3/protocol/rest/client"
)
func init() {
	extension.SetRestClient(constant.DEFAULT_REST_CLIENT, NewRestyClient)
}
type RestyClient struct {
	client *resty.Client
}