mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
@@ -128,15 +128,18 @@ func (c *mockRunnerCall) SlotDeadline() time.Time {
|
||||
return c.slotDeadline
|
||||
}
|
||||
|
||||
func (c *mockRunnerCall) Request() *http.Request {
|
||||
return c.r
|
||||
func (c *mockRunnerCall) RequestBody() io.ReadCloser {
|
||||
return c.r.Body
|
||||
}
|
||||
|
||||
func (c *mockRunnerCall) ResponseWriter() http.ResponseWriter {
|
||||
return c.rw
|
||||
}
|
||||
|
||||
func (c *mockRunnerCall) StdErr() io.ReadWriteCloser {
|
||||
return c.stdErr
|
||||
}
|
||||
|
||||
func (c *mockRunnerCall) Model() *models.Call {
|
||||
return c.model
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user