Bugfix/grpc consume eof (#912)

* GRPC streams end with an EOF

The client should ensure that the final packet is followed by a GRPC
EOF. This has the benefit of permitting the client code to clean up resources.

* Don't require an entire HTTP request in RunnerCall

TryExec needs a handle on an incoming ReadCloser containing the body
of a request; however, everything else will already have been extracted
from the HTTP request in the case of lbAgent use.

(The point of this change is to simplify the interface for other uses.)

* Return error from GRPC layer explicitly

As per review
This commit is contained in:
jan grant
2018-04-03 15:04:21 +01:00
committed by GitHub
parent 3c536d1e01
commit 88074a42c0
4 changed files with 15 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ type Runner interface {
// processed by a RunnerPool
type RunnerCall interface {
SlotDeadline() time.Time
Request() *http.Request
RequestBody() io.ReadCloser
ResponseWriter() http.ResponseWriter
StdErr() io.ReadWriteCloser
Model() *models.Call