This pull request addresses #5. Until now every check which required info from the Docker server had to make one or more API calls. I have added a new struct, named Target which is initialized when actuary starts.
The struct instance stores a pointer to the engine-api client, a list of containers along with their docker inspect output and the output of client.Info().
This information can be used by every check which significantly reduces API calls (making Actuary faster and more reliable) during an audit and saves us a few lines of code.
This pull request addresses #5. Until now every check which required info from the Docker server had to make one or more API calls. I have added a new struct, named
Target
which is initialized when actuary starts. The struct instance stores a pointer to the engine-api client, a list of containers along with theirdocker inspect
output and the output of client.Info(). This information can be used by every check which significantly reduces API calls (making Actuary faster and more reliable) during an audit and saves us a few lines of code.cc @diogomonica