Add initial containerd *Client
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
17
client_unix.go
Normal file
17
client_unix.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package containerd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func dialer(address string, timeout time.Duration) (net.Conn, error) {
|
||||
address = strings.TrimPrefix(address, "unix://")
|
||||
return net.DialTimeout("unix", address, timeout)
|
||||
}
|
||||
|
||||
func dialAddress(address string) string {
|
||||
return fmt.Sprintf("unix://%s", address)
|
||||
}
|
Reference in New Issue
Block a user