fn: lb & pure-runner slot hash id communication (#1007)

* fn: lb & pure-runner slot hash id communication

With this change, LB can pre-calculate the slot hash
key and pass it to runners. If LB knows/calculates
the slot hash ids, then it can also make better
estimates on which runner can successfully execute
it especially when status messages from runner
include a small summary of idle slots for a given
slot hash id. (TODO)

* fn: fix mock test
This commit is contained in:
Tolga Ceylan
2018-05-25 14:12:48 -07:00
committed by GitHub
parent 9584643142
commit 74a5379dec
9 changed files with 69 additions and 35 deletions

View File

@@ -122,12 +122,17 @@ type mockRunnerCall struct {
rw http.ResponseWriter
stdErr io.ReadWriteCloser
model *models.Call
slotHashId string
}
func (c *mockRunnerCall) LbDeadline() time.Time {
return c.lbDeadline
}
func (c *mockRunnerCall) SlotHashId() string {
return c.slotHashId
}
func (c *mockRunnerCall) RequestBody() io.ReadCloser {
return c.r.Body
}