open-nomad/nomad/drainer
Seth Hoenig db2347a86c cleanup: prevent leaks from time.After
This PR replaces use of time.After with a safe helper function
that creates a time.Timer to use instead. The new function returns
both a time.Timer and a Stop function that the caller must handle.

Unlike time.NewTimer, the helper function does not panic if the duration
set is <= 0.
2022-02-02 14:32:26 -06:00
..
drain_heap.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
drain_heap_test.go fixing tests 2018-10-04 14:26:19 -07:00
drain_testing.go tests: fix some nomad/drainer test data races 2019-05-21 14:40:58 -04:00
drainer.go Migrate all allocs when draining a node (#10411) 2021-04-21 12:11:14 -04:00
drainer_util.go drain: improve tests and fix spelling 2018-04-02 16:40:47 -07:00
drainer_util_test.go Fix typos 2018-05-07 14:50:01 -05:00
draining_node.go Safety guard 2018-04-25 16:00:56 -07:00
draining_node_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
watch_jobs.go cleanup: prevent leaks from time.After 2022-02-02 14:32:26 -06:00
watch_jobs_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
watch_nodes.go cleanup: prevent leaks from time.After 2022-02-02 14:32:26 -06:00
watch_nodes_test.go Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00