google/cadvisor — pull request #49 by monnand (2014-06-14 21:56:56+00:00)
Title: General framework for database backend

To support database/datastore or any other stats info analyzing backend like influxdb, I added a db package. The stats could be sent to the third party software through a container decorator. This PR could be used as a starting point to fix #39

Changes of this PR:

- In db package:
* Add an interface named ``ContainerStatsWriter`` and its corresponding factory interface. Its implementation could be used to store/send container stats.
* Add a Manager class to manage different ``ContainerStatsWriter`` implementations.
- In container package:
* Add an interface named ``ContainerHandlerDecorator``.
* Inside ``factoryManager``, add a method named ``RegistorContainerDecorators()``. Users could use this method to register a list of decorators which will be always applied on any container handler generated from the ``factoryManager``. Using this method, we could add container decorators easily at the top level not in each container driver.
* Remove ``statssumfactory.go`` because we do not need it.