File: carbon_cache_plugin.py

package info (click to toggle)
graphite-carbon 1.1.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 764 kB
  • sloc: python: 4,033; xml: 732; sh: 617; makefile: 25
file content (25 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (4)
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 CarbonCacheServiceMaker(object):

    tapname = "carbon-cache"
    description = "Collect stats for graphite."
    options = conf.CarbonCacheOptions

    def makeService(self, options):
        """
        Construct a C{carbon-cache} service.
        """
        from carbon import service
        return service.createCacheService(options)


# Now construct an object which *provides* the relevant interfaces
serviceMaker = CarbonCacheServiceMaker()