open-nomad/client/allocwatcher
Tim Gross d018fcbff7
allocrunner: provide factory function so we can build mock ARs (#17161)
Tools like `nomad-nodesim` are unable to implement a minimal implementation of
an allocrunner so that we can test the client communication without having to
lug around the entire allocrunner/taskrunner code base. The allocrunner was
implemented with an interface specifically for this purpose, but there were
circular imports that made it challenging to use in practice.

Move the AllocRunner interface into an inner package and provide a factory
function type. Provide a minimal test that exercises the new function so that
consumers have some idea of what the minimum implementation required is.
2023-05-12 13:29:44 -04:00
..
alloc_watcher.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
alloc_watcher_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
alloc_watcher_unix_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
doc.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
group_alloc_watcher.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
group_alloc_watcher_test.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00