implement tcp and tcp+tls transports

This commit is contained in:
Christian Schwarz
2018-08-25 12:58:17 +02:00
parent 873c64ecc3
commit d677cde6d0
7 changed files with 325 additions and 41 deletions
+2 -5
View File
@@ -51,7 +51,7 @@ func parsePullJob(c JobParsingContext, name string, i map[string]interface{}) (j
j = &PullJob{Name: name}
j.Connect, err = parseSSHStdinserverConnecter(asMap.Connect)
j.Connect, err = parseConnect(asMap.Connect)
if err != nil {
err = errors.Wrap(err, "cannot parse 'connect'")
return nil, err
@@ -167,10 +167,7 @@ func (j *PullJob) doRun(ctx context.Context) {
ConnConfig: STREAMRPC_CONFIG,
}
//client, err := streamrpc.NewClient(j.Connect, clientConf)
client, err := streamrpc.NewClient(&tcpConnecter{net.Dialer{
Timeout: 10*time.Second,
}}, clientConf)
client, err := streamrpc.NewClient(j.Connect, clientConf)
defer client.Close()
j.task.Enter("pull")