mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			669 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			669 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// +build !windows
 | 
						|
// Copyright 2016 go-dockerclient authors. All rights reserved.
 | 
						|
// Use of this source code is governed by a BSD-style
 | 
						|
// license that can be found in the LICENSE file.
 | 
						|
 | 
						|
package storageos
 | 
						|
 | 
						|
import (
 | 
						|
	"net"
 | 
						|
	"net/http"
 | 
						|
)
 | 
						|
 | 
						|
// initializeNativeClient initializes the native Unix domain socket client on
 | 
						|
// Unix-style operating systems
 | 
						|
func (c *Client) initializeNativeClient() {
 | 
						|
	if c.endpointURL.Scheme != unixProtocol {
 | 
						|
		return
 | 
						|
	}
 | 
						|
	socketPath := c.endpointURL.Path
 | 
						|
	tr := defaultTransport()
 | 
						|
	tr.Dial = func(network, addr string) (net.Conn, error) {
 | 
						|
		return c.Dialer.Dial(unixProtocol, socketPath)
 | 
						|
	}
 | 
						|
	c.nativeHTTPClient = &http.Client{Transport: tr}
 | 
						|
}
 |