// RestoreClient allows the developer to disable and restore the
// original transport in the given http.Client.
433172
func RestoreClient(cli *http.Client) {
	trans, ok := cli.Transport.(*Transport)
	if !ok {
		return
	}
	cli.Transport = trans.Transport
}
973049
func (c *ProjectClient) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
801039
func (e *Executor) Restore(id string, stdout, stderr io.WriteCloser) (bool, error) {
	alive, _, p, err := e.client.Restore(context.Background(), id, attachStreamsFunc(stdout, stderr))
	if err != nil && !errdefs.IsNotFound(err) {
		return false, err
	}
	if !alive {
		deleteTaskAndContainer(context.Background(), e.client, id, p)
	}
	return alive, nil
}
614685
func GetClient(tripperFactory common.TripperFactory, creds *common.Credentials, provider common.Provider) (*http.Client, error) {

	tripper, tripperErr := tripperFactory.NewTripper(creds, provider)

	if tripperErr != nil {
		return nil, tripperErr
	}

	return &http.Client{Transport: tripper}, nil
}
942722
func HTTPClient(client *http.Client) Option {
	return func(c *Client) error {
		c.httpClient = client
		return nil
	}
}
1042108
func NewClient(c *Connection) (*Client, error) {
	t, err := newTransport(c)
	if err != nil {
		return nil, err
	}
	return &Client{
		Connection: c,
		transport:  t,
	}, nil
}
405553
func (l *lbmapCache) restoreService(svc loadbalancer.LBSVC, v2Exists bool) error {
	l.mutex.Lock()
	defer l.mutex.Unlock()

	serviceKey, serviceValues, err := LBSVC2ServiceKeynValue(svc)
	if err != nil {
		return err
	}

	frontendID := serviceKey.String()

	bpfSvc, ok := l.entries[frontendID]
	if !ok {
		bpfSvc = newBpfService(serviceKey)
		l.entries[frontendID] = bpfSvc
	}

	if option.Config.EnableLegacyServices {
		for index, backend := range serviceValues {
			b := &bpfBackend{
				id:       backend.BackendAddrID(),
				bpfValue: backend,
			}
			if _, ok := bpfSvc.uniqueBackends[backend.BackendAddrID()]; ok {
				b.isHole = true
			} else {
				bpfSvc.uniqueBackends[backend.BackendAddrID()] = backend
				bpfSvc.slaveSlotByBackendAddrID[backend.BackendAddrID()] = index + 1
			}

			bpfSvc.backendsByMapIndex[index+1] = b
		}
	}

	if !option.Config.EnableLegacyServices || v2Exists {
		for _, backend := range serviceValues {
			addrID := backend.BackendAddrID()
			if _, found := bpfSvc.backendsV2[addrID]; !found {
				l.addBackendV2Locked(addrID)
			}
			bpfSvc.backendsV2[addrID] = backend
		}
	}

	return nil
}
473152
func buildClient(f func(*transportOptions) *http.Client) TransportOption {
	return func(options *transportOptions) {
		options.buildClient = f
	}
}
298687
func UpdateClient(client *autorest.Client) {
	if client.UserAgent == "" {
		client.UserAgent = JujuPrefix()
	} else {
		client.UserAgent = JujuPrefix() + " " + client.UserAgent
	}
}
875050
func (c *ApiextensionsV1beta1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
871508
func newClient(addr, endpoint string) *ReconnectRPCClient {
	return &ReconnectRPCClient{
		addr:     addr,
		endpoint: endpoint,
	}
}
648070
func (fw *FirewallSSO) getHttpClient(ctx context.Context) *http.Client {
	// We don't check the TLS certificate if applicable
	transport := &http.Transport{
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}
	return &http.Client{Transport: transport}
}
549240
func HTTPClient(client *http.Client) Option {
	return func(c *Client) error {
		// create dns service
		l, err := dns.New(client)
		if err != nil {
			return err
		}
		return DNSService(l)(c)
	}
}
1172347
func (t *Term) Restore() error {
	return termios.Tcsetattr(uintptr(t.fd), termios.TCIOFLUSH, &t.orig)
}
728971
func NewClient(ctx context.Context, config *Config, token *Token) *http.Client {
	transport := &Transport{
		Base:   contextTransport(ctx),
		source: StaticTokenSource(token),
		auther: newAuther(config),
	}
	return &http.Client{Transport: transport}
}
341220
func (c *CoreV1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
1317113
func (c *WardleV1alpha1Client) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}