~canonical-ci-engineering/ubuntu-ci-services-itself/graphite-carbon

« back to all changes in this revision

Viewing changes to lib/twisted/plugins/carbon_relay_plugin.py

  • Committer: Package Import Robot
  • Author(s): Jonas Genannt
  • Date: 2012-04-07 22:10:31 UTC
  • Revision ID: package-import@ubuntu.com-20120407221031-305q0ls62n4kg0sd
Tags: upstream-0.9.9+debian
ImportĀ upstreamĀ versionĀ 0.9.9+debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from zope.interface import implements
 
2
 
 
3
from twisted.plugin import IPlugin
 
4
from twisted.application.service import IServiceMaker
 
5
 
 
6
from carbon import service
 
7
from carbon import conf
 
8
 
 
9
 
 
10
class CarbonRelayServiceMaker(object):
 
11
 
 
12
    implements(IServiceMaker, IPlugin)
 
13
    tapname = "carbon-relay"
 
14
    description = "Relay stats for graphite."
 
15
    options = conf.CarbonRelayOptions
 
16
 
 
17
    def makeService(self, options):
 
18
        """
 
19
        Construct a C{carbon-relay} service.
 
20
        """
 
21
        return service.createRelayService(options)
 
22
 
 
23
 
 
24
# Now construct an object which *provides* the relevant interfaces
 
25
serviceMaker = CarbonRelayServiceMaker()