open-nomad/client
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
..
allocdir users: eliminate nobody user memoization (#16904) 2023-04-17 12:30:30 -05:00
allochealth [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
allocrunner allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
allocwatcher allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
config allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
consul [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
devicemanager [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
dynamicplugins Merge pull request #16836 from hashicorp/compliance/add-headers 2023-04-10 16:32:03 -07:00
fingerprint cni: fix plugin fingerprinting versions (#16776) 2023-04-20 18:44:39 -07:00
interfaces [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
lib [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
logmon [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
pluginmanager Merge pull request #16836 from hashicorp/compliance/add-headers 2023-04-10 16:32:03 -07:00
servers [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
serviceregistration [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
state allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
stats [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
structs Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
taskenv fix host port handling for ipv6 (#16723) 2023-04-20 19:53:20 -07:00
testutil Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
vaultclient [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
acl.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
acl_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
agent_endpoint.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
agent_endpoint_test.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
alloc_endpoint.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
alloc_endpoint_test.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
alloc_watcher_e2e_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
client.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
client_interface_test.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
client_stats_endpoint.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
client_stats_endpoint_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
client_test.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
csi_endpoint.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
csi_endpoint_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
drain.go client: allow `drain_on_shutdown` configuration (#16827) 2023-04-14 15:35:32 -04:00
drain_test.go client: allow `drain_on_shutdown` configuration (#16827) 2023-04-14 15:35:32 -04:00
driver_manager_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
enterprise_client_oss.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
fingerprint_manager.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
fingerprint_manager_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
fs_endpoint.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
fs_endpoint_test.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
gc.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
gc_test.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
heartbeatstop.go allocrunner: provide factory function so we can build mock ARs (#17161) 2023-05-12 13:29:44 -04:00
heartbeatstop_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
meta_endpoint.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
meta_endpoint_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
node_updater.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
rpc.go Revert "hashicorp/go-msgpack v2 (#16810)" (#17047) 2023-05-01 17:18:34 -04:00
rpc_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
testing.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
util.go client: de-duplicate alloc updates and gate during restore (#17074) 2023-05-11 09:05:24 -04:00