1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from carbon import conf
@implementer(IServiceMaker, IPlugin)
class CarbonAggregatorCacheServiceMaker(object):
tapname = "carbon-aggregator-cache"
description = "Aggregate and write stats for graphite."
options = conf.CarbonAggregatorOptions
def makeService(self, options):
"""
Construct a C{carbon-aggregator-cache} service.
"""
from carbon import service
return service.createAggregatorCacheService(options)
# Now construct an object which *provides* the relevant interfaces
serviceMaker = CarbonAggregatorCacheServiceMaker()
|