disconnected clients: Add reconnect task event (#12133)

* Add TaskClientReconnectedEvent constant
* Add allocRunner.Reconnect function to manage task state manually
* Removes server-side push
This commit is contained in:
Derek Strickland
2022-03-02 05:47:26 -05:00
committed by DerekStrickland
parent 97ce949f0e
commit 35752655b0
10 changed files with 263 additions and 6 deletions

View File

@@ -36,6 +36,11 @@ func (m *MockStateUpdater) AllocStateUpdated(alloc *structs.Allocation) {
m.mu.Unlock()
}
// PutAllocation satisfies the AllocStateHandler interface.
func (m *MockStateUpdater) PutAllocation(alloc *structs.Allocation) (err error) {
return
}
// Last returns a copy of the last alloc (or nil) update. Safe for concurrent
// access with updates.
func (m *MockStateUpdater) Last() *structs.Allocation {