Add initial containerd *Client

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-05-23 15:50:06 -07:00
parent 17033dcaf2
commit d0e5732f0b
10 changed files with 482 additions and 0 deletions

17
client_unix.go Normal file
View 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)
}