(args []string, batchLines []string)
| 25 | } |
| 26 | |
| 27 | func (a *SSHBatchClient) batchInternal(args []string, batchLines []string) (int, []string, []string, error) { |
| 28 | conn, err := a.transfer.Connection(0) |
| 29 | if err != nil { |
| 30 | return 0, nil, nil, errors.Wrap(err, tr.Tr.Get("could not get connection for batch request")) |
| 31 | } |
| 32 | conn.Lock() |
| 33 | defer conn.Unlock() |
| 34 | err = conn.SendMessageWithLines("batch", args, batchLines) |
| 35 | if err != nil { |
| 36 | return 0, nil, nil, errors.Wrap(err, tr.Tr.Get("batch request")) |
| 37 | } |
| 38 | |
| 39 | status, args, lines, err := conn.ReadStatusWithLines() |
| 40 | if err != nil { |
| 41 | return status, nil, nil, errors.Wrap(err, tr.Tr.Get("batch response")) |
| 42 | } |
| 43 | return status, args, lines, err |
| 44 | } |
| 45 | |
| 46 | func (a *SSHBatchClient) Batch(remote string, bReq *batchRequest) (*BatchResponse, error) { |
| 47 | bRes := &BatchResponse{TransferAdapterName: "ssh"} |
no test coverage detected