diogomonica / actuary

An actuary is a business professional who analyzes the financial consequences of risk.
77 stars 14 forks source link

Added Target struct #20

Closed zuBux closed 8 years ago

zuBux commented 8 years ago

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.

cc @diogomonica

diogomonica commented 8 years ago

LGTM after minor nits