You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: client.go
    path of file: ./repos/awless/vendor/github.com/wallix/awless-scheduler/client
    
    the code of the file until where you have to start completion: package client

import (
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"strings"
	"time"

	"github.com/wallix/awless-scheduler/model"
)

type Client struct {
	ServiceURL  *url.
    
func New(discoveryURL string) (*Client, error) {
	httpClient := &http.Client{Timeout: 3 * time.Second}
	resp, err := httpClient.Get(discoveryURL)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	v := &model.ServiceInfo{}
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("cannot read body at discovery enpoint '%s', status code %s. Error: %s", discoveryURL, resp.Status, err)
	}
	if err := json.Unmarshal(body, v); err != nil {
		return nil, fmt.Errorf("cannot unmarshal json at discovery enpoint '%s': %s. Body was:\n%s", discoveryURL, err, body)
	}

	if v.UnixSockMode {
		c := newUnixSock(v.ServiceAddr)
		c.serviceInfo = v
		return c, nil
	}

	addr, err := url.Parse(v.ServiceAddr)
	if err != nil {
		return nil, fmt.Errorf("cannot parse scheduler service addr %s: %s", v.ServiceAddr, err)
	}

	return &Client{
		ServiceURL:  addr,
		httpClient:  httpClient,
		serviceInfo: v,
	}, nil
}