// ---------------------------------------
// NewECSClient creates a new instance of ECS client
// ---------------------------------------
508579
func NewECSClient(accessKeyId, accessKeySecret string, regionID common.Region) *Client {
	return NewECSClientWithSecurityToken(accessKeyId, accessKeySecret, "", regionID)
}
1355103
func (o *OrgsClient) Create(ctx context.Context, name string) (*envelope.Org, error) {
	org := orgCreateRequest{}
	org.Body.Name = name

	res := envelope.Org{}
	err := o.client.RoundTrip(ctx, "POST", "/orgs", nil, &org, &res)
	return &res, err
}
414721
func NewClientNew(accessKeyId, accessKeySecret string) *Client {
	endpoint := os.Getenv("DNS_ENDPOINT")
	if endpoint == "" {
		endpoint = DNSDefaultEndpointNew
	}
	return NewClientWithEndpoint(endpoint, accessKeyId, accessKeySecret)
}
627850
func (m *MockRPCClient) NewRPCClient(contextID, channel, rpcSecret string) error {
	ret := m.ctrl.Call(m, "NewRPCClient", contextID, channel, rpcSecret)
	ret0, _ := ret[0].(error)
	return ret0
}
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
}
9035
func NewWSClient(remoteAddr, endpoint string, options ...func(*WSClient)) *WSClient {
	addr, dialer := makeHTTPDialer(remoteAddr)
	c := &WSClient{
		Address:              addr,
		Dialer:               dialer,
		Endpoint:             endpoint,
		PingPongLatencyTimer: metrics.NewTimer(),

		maxReconnectAttempts: defaultMaxReconnectAttempts,
		readWait:             defaultReadWait,
		writeWait:            defaultWriteWait,
		pingPeriod:           defaultPingPeriod,
	}
	c.BaseService = *cmn.NewBaseService(nil, "WSClient", c)
	for _, option := range options {
		option(c)
	}
	return c
}
398998
func NewClient(doer Doer) *Client {
	if doer == nil {
		doer = http.DefaultClient
	}
	baseURL, _ := url.Parse(defaultBaseURL)
	client := &Client{doer: doer, BaseURL: baseURL, UserAgent: userAgent}
	return client
}
4909
func NewClient(params ClientParams) Client {
	return newClient(params.ServiceName, params.ClientConfig, params.Options...)
}
1317820
func NewClient(customerName string) *Client {
	return &Client{
		CustomerName: customerName,
		Transport:    &http.Transport{Proxy: http.ProxyFromEnvironment},
	}
}
695124
func NewClient(config *Config) (*Client, error) {
	c, err := tlsutil.NewConfigurator(config.ToTLSUtilConfig(), nil)
	if err != nil {
		return nil, err
	}
	return NewClientLogger(config, nil, c)
}
1262683
func NewClient(conn *rpcc.Conn) *Client {
	return &Client{
		Accessibility:        accessibility.NewClient(conn),
		Animation:            animation.NewClient(conn),
		ApplicationCache:     applicationcache.NewClient(conn),
		Audits:               audits.NewClient(conn),
		BackgroundService:    backgroundservice.NewClient(conn),
		Browser:              browser.NewClient(conn),
		CSS:                  css.NewClient(conn),
		CacheStorage:         cachestorage.NewClient(conn),
		Cast:                 cast.NewClient(conn),
		Console:              console.NewClient(conn),
		DOM:                  dom.NewClient(conn),
		DOMDebugger:          domdebugger.NewClient(conn),
		DOMSnapshot:          domsnapshot.NewClient(conn),
		DOMStorage:           domstorage.NewClient(conn),
		Database:             database.NewClient(conn),
		Debugger:             debugger.NewClient(conn),
		DeviceOrientation:    deviceorientation.NewClient(conn),
		Emulation:            emulation.NewClient(conn),
		Fetch:                fetch.NewClient(conn),
		HeadlessExperimental: headlessexperimental.NewClient(conn),
		HeapProfiler:         heapprofiler.NewClient(conn),
		IO:                   io.NewClient(conn),
		IndexedDB:            indexeddb.NewClient(conn),
		Input:                input.NewClient(conn),
		Inspector:            inspector.NewClient(conn),
		LayerTree:            layertree.NewClient(conn),
		Log:                  log.NewClient(conn),
		Memory:               memory.NewClient(conn),
		Network:              network.NewClient(conn),
		Overlay:              overlay.NewClient(conn),
		Page:                 page.NewClient(conn),
		Performance:          performance.NewClient(conn),
		Profiler:             profiler.NewClient(conn),
		Runtime:              runtime.NewClient(conn),
		Schema:               schema.NewClient(conn),
		Security:             security.NewClient(conn),
		ServiceWorker:        serviceworker.NewClient(conn),
		Storage:              storage.NewClient(conn),
		SystemInfo:           systeminfo.NewClient(conn),
		Target:               target.NewClient(conn),
		Tethering:            tethering.NewClient(conn),
		Tracing:              tracing.NewClient(conn),
	}
}
214554
func NewClient(conn io.ReadWriteCloser) *Client {
	encBuf := bufio.NewWriter(conn)
	client := &gobClientCodec{conn, gob.NewDecoder(conn), gob.NewEncoder(encBuf), encBuf}
	return NewClientWithCodec(client)
}
1104928
func New(consumerKey, consumerSecret, accessToken, tokenSecret string) *Client {
	c := &Client{}
	c.ConsumerKey = consumerKey
	c.ConsumerSecret = consumerSecret
	c.AccessToken = accessToken
	c.TokenSecret = tokenSecret

	c.Keys = &KeyResource{c}
	c.Repos = &RepoResource{c}
	c.Users = &UserResource{c}
	c.Emails = &EmailResource{c}
	c.Brokers = &BrokerResource{c}
	c.Teams = &TeamResource{c}
	c.RepoKeys = &RepoKeyResource{c}
	c.Sources = &SourceResource{c}
	return c
}
687945
func New(opts ...Opt) *Client {
	c := &Client{
		codec:       DefaultCodec,
		do:          With(DefaultConfigOpt...),
		header:      cloneHeaders(DefaultHeaders),
		errorMapper: DefaultErrorMapper,
	}
	c.buildRequestFunc = c.buildRequest
	c.handleResponse = c.HandleResponse
	c.With(opts...)
	return c
}
232955
func New(channelProvider context.ChannelProvider, opts ...ClientOption) (*Client, error) {

	channelContext, err := channelProvider()
	if err != nil {
		return nil, errors.WithMessage(err, "failed to create channel context")
	}

	greylistProvider := greylist.New(channelContext.EndpointConfig().Timeout(fab.DiscoveryGreylistExpiry))

	if channelContext.ChannelService() == nil {
		return nil, errors.New("channel service not initialized")
	}

	eventService, err := channelContext.ChannelService().EventService()
	if err != nil {
		return nil, errors.WithMessage(err, "event service creation failed")
	}

	membership, err := channelContext.ChannelService().Membership()
	if err != nil {
		return nil, errors.WithMessage(err, "membership creation failed")
	}

	channelClient := newClient(channelContext, membership, eventService, greylistProvider)

	for _, param := range opts {
		err := param(&channelClient)
		if err != nil {
			return nil, errors.WithMessage(err, "option failed")
		}
	}

	return &channelClient, nil
}
1062598
func NewClient(addr string, tlsConfig *tlsconfig.Options) (*Client, error) {
	clientTransport, err := newTransport(addr, tlsConfig)
	if err != nil {
		return nil, err
	}
	return newClientWithTransport(clientTransport, 0), nil
}
1251931
func NewClient(gateway, certificateFile, keyFile string) (c *Client) {
	c = new(Client)
	c.Gateway = gateway
	c.CertificateFile = certificateFile
	c.KeyFile = keyFile
	return
}