Feature/acksync response writer (#1267)

This implements a "detached" mechanism to get an ack from the runner
once it actually starts to run a function. In this scenario the response
returned back is just a 202 if we placed the function in a specific
time-frame. If we hit some errors or we fail to place the fn in time we
return back different errors.
This commit is contained in:
Andrea Rosa
2018-11-09 18:25:43 +00:00
committed by Tolga Ceylan
parent 2df6c8d349
commit 182db94fad
17 changed files with 453 additions and 58 deletions

View File

@@ -13,7 +13,8 @@ import (
// Placer implements a placement strategy for calls that are load-balanced
// across runners in a pool
type Placer interface {
PlaceCall(rp RunnerPool, ctx context.Context, call RunnerCall) error
PlaceCall(ctx context.Context, rp RunnerPool, call RunnerCall) error
GetPlacerConfig() PlacerConfig
}
// RunnerPool is the abstraction for getting an ordered list of runners to try for a call