// NewCeleryClient creates new celery client
979464
func NewCeleryClient(broker CeleryBroker, backend CeleryBackend, numWorkers int) (*CeleryClient, error) {
	return &CeleryClient{
		broker,
		backend,
		NewCeleryWorker(broker, backend, numWorkers),
	}, nil
}
1001959
func NewClient(rw io.ReadWriter) Client {
	return &client{
		reader: reader{bufio.NewReaderSize(rw, readerBuffer)},
		writer: writer{Writer: rw},
	}
}
559543
func NewClient(host string, port int) (client *Client, err error) {
	client = new(Client)
	client.Host = host
	client.Port = port
	client.Connection, err = net.Dial("tcp", fmt.Sprintf("%v:%v", client.Host, client.Port))
	return
}
86752
func NewClient(accessKeyId, accessKeySecret string) *Client {
	return &Client{
		AccessKeyId:     accessKeyId,
		AccessKeySecret: accessKeySecret,
		endpoint:        CSDefaultEndpoint,
		Version:         CSAPIVersion,
		httpClient:      &http.Client{},
	}
}
886354
func NewClient(auth Auth) *Client {
	return &Client{auth: auth, client: http.DefaultClient}
}
1193147
func NewClient(name string, c envelope.Client) envelope.Client {
	return client{name: name, c: c}
}
114388
func NewClient(w io.Writer, r io.Reader) *Client {
	return &Client{
		r: NewReader(r),
		w: NewWriter(w),
	}
}
1007861
func NewClient(ctx context.Context, cli *containerd.Client, stateDir, ns string, b libcontainerdtypes.Backend) (libcontainerdtypes.Client, error) {
	return remote.NewClient(ctx, cli, stateDir, ns, b)
}
1359100
func NewClient(caller base.APICaller) *Client {
	facadeCaller := base.NewFacadeCaller(caller, remoteRelationsFacade)
	return &Client{facadeCaller}
}
1229834
func NewClient(token, tokenSecret, zone string) *Client {
	c := &Client{
		AccessToken:            token,
		AccessTokenSecret:      tokenSecret,
		Zone:                   zone,
		TraceMode:              false,
		DefaultTimeoutDuration: 20 * time.Minute,
		UserAgent:              fmt.Sprintf("libsacloud/%s", libsacloud.Version),
		AcceptLanguage:         "",
		RetryMax:               0,
		RetryInterval:          5 * time.Second,
	}
	c.API = newAPI(c)
	return c
}
895541
func NewClient(clientConfig ClientConfig) *Client {
	client := &Client{
		ClientConfig: clientConfig,
	}

	// If reader is nil use default rand.Reader
	if clientConfig.Reader == nil {
		client.Reader = rand.Reader
	}

	// If hash is nil use default sha256
	if clientConfig.Hash == nil {
		client.Hash = sha256.New()
	}

	return client
}
628137
func NewClient(server ...string) (*Client, error) {
	ss := new(ServerList)
	if len(server) == 0 {
		server = []string{"localhost:6379"}
	}
	if err := ss.SetServers(server...); err != nil {
		return nil, err
	}
	return NewFromSelector(ss), nil
}
317381
func NewClient(conf *cloudstorage.Config) (*az.Client, *az.BlobStorageClient, error) {

	switch conf.AuthMethod {
	case AuthKey:
		accessKey := conf.Settings.String(ConfKeyAuthKey)
		if accessKey == "" {
			return nil, nil, ErrNoAccessKey
		}
		basicClient, err := az.NewBasicClient(conf.Project, accessKey)
		if err != nil {
			gou.Warnf("could not get azure client %v", err)
			return nil, nil, err
		}
		client := basicClient.GetBlobService()
		return &basicClient, &client, err
	}

	return nil, nil, ErrNoAuth
}
887613
func NewClient(h string, p int) Client {
	return Client{
		Host: h,
		Port: p,
	}
}
898281
func NewClient(apiDef *raml.APIDefinition, dir string) Client {
	return Client{
		APIDef: apiDef,
		Dir:    dir,
	}
}
623438
func (ctx *apiContext) NewBakeryClient() *httpbakery.Client {
	client := httpbakery.NewClient()
	client.Jar = ctx.jar
	client.WebPageVisitor = ctx.webPageVisitor
	return client
}
597682
func NewClient(endpoint *Endpoint, user, password string) (*Client, error) {
	return NewClientWithParameters(endpoint, user, password, DefaultParameters)
}