Share Dialer and DialAddress between client and shim

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-10 16:47:02 -07:00
parent 587a811d09
commit 7ac351cdfe
4 changed files with 9 additions and 17 deletions

View File

@@ -31,7 +31,7 @@ type dialResult struct {
err error
}
func dialer(address string, timeout time.Duration) (net.Conn, error) {
func Dialer(address string, timeout time.Duration) (net.Conn, error) {
var (
stopC = make(chan struct{})
synC = make(chan *dialResult)
@@ -69,6 +69,6 @@ func dialer(address string, timeout time.Duration) (net.Conn, error) {
}
}
func dialAddress(address string) string {
func DialAddress(address string) string {
return fmt.Sprintf("unix://%s", address)
}