(ctx *customAdapterWorkerContext)
| 189 | } |
| 190 | |
| 191 | func (a *customAdapter) readResponse(ctx *customAdapterWorkerContext) (*customAdapterResponseMessage, error) { |
| 192 | line, err := ctx.bufferedOut.ReadString('\n') |
| 193 | if err != nil { |
| 194 | return nil, err |
| 195 | } |
| 196 | a.Trace("xfer: Custom adapter worker %d received response: %v", ctx.workerNum, strings.TrimSpace(line)) |
| 197 | resp := &customAdapterResponseMessage{} |
| 198 | err = json.Unmarshal([]byte(line), resp) |
| 199 | return resp, err |
| 200 | } |
| 201 | |
| 202 | // exchangeMessage sends a message to a process and reads a response if resp != nil |
| 203 | // Only fatal errors to communicate return an error, errors may be embedded in reply |
no test coverage detected