def run_twistd(): # This is a (somewhat awful hack) based on twistd. # Twistd plugins have great difficulty being packaged # by distutils, pip, etc., and there is no # current workaround. # This function basically recreates twistd, # and inserts the EMEN2 Service as the only plugin. # This gets around having to have twisted/plugins/emen2_plugin.py # in a directory without an __init__.py # Run: # python -m emen2.tap [twistd options] emen2 [emen2 options] from twisted.application.service import ServiceMaker from twisted.application import app from twisted.python.runtime import platformType from twisted import plugin #### From twisted/plugins/emen2_plugin.py ##### EMEN2Server = ServiceMaker("EMEN2", "emen2.tap", ("EMEN2 server"), "emen2") #### Copied from twisted/scripts/twistd.py ##### if platformType == "win32": from twisted.scripts._twistw import ServerOptions, \ WindowsApplicationRunner as _SomeApplicationRunner else: from twisted.scripts._twistd_unix import ServerOptions, \ UnixApplicationRunner as _SomeApplicationRunner #Create an altered ServerOptions that only runs EMEN2. class TestOptions(ServerOptions): def _getPlugins(self, interface, package=None): f = plugin.getPlugins(interface, package=None) return list(f) + [EMEN2Server] def runApp(config): _SomeApplicationRunner(config).run() app.run(runApp, TestOptions)
# Copyright (c) 2005-2008 Ralph Meijer # See LICENSE for details try: from twisted.application.service import ServiceMaker except ImportError: from twisted.scripts.mktap import _tapHelper as ServiceMaker mimirAggregator = ServiceMaker("Mimir Aggregator", "mimir.aggregator.tap", "Mimir Feed Aggregator and Feeder", "aggregator")
from twisted.application.service import ServiceMaker DreamSSHService = ServiceMaker( "DreamSSH Server", "dreamssh.app.service", ("A highly flexible pure-Python, Twisted-based SSH Server with custom " "account shells"), "dreamssh")
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedPortForward = ServiceMaker( "Twisted Port-Forwarding", "twisted.tap.portforward", "A simple port-forwarder.", "portforward", )
""" Bloc twisted application plugins. """ from twisted.application.service import ServiceMaker blocService = ServiceMaker("bloc Service/", "bloc.tap", "Single master group membership server", "bloc")
# Copyright 2012 Rackspace Hosting, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from twisted.application.service import ServiceMaker RESTkinAPI = ServiceMaker( "RESTkin API - A REST interface to tracing with Zipkin", "restkin.tap.api", "Forward REST requests to Zipkin over scribe.", "restkin-api") RESTKinScribe = ServiceMaker( "RESTKin Scribe - A Scribe collector that posts to RESTKin", "restkin.tap.scribe", "Forward JSON Scribe Logs to RESTKin to be carried on to Zipkin.", "restkin-scribe")
############################################################################### ## ## Copyright 2012 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## ############################################################################### from twisted.application.service import ServiceMaker serviceMaker = ServiceMaker('echows', 'echows.main', 'Autobahn WebSocket Echo Service', 'echows')
from twisted.application.service import ServiceMaker XslProxyService = ServiceMaker("Xsl Proxy Service", "xslproxy.service", "XSL transforming reverse proxy", "xslproxy")
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedTelnet = ServiceMaker( "Twisted Telnet Shell Server", "twisted.tap.telnet", "A simple, telnet-based remote debugging service.", "telnet")
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedSSH = ServiceMaker("Twisted Conch Server", "twisted.conch.tap", "A Conch SSH service.", "conch") TwistedManhole = ServiceMaker( "Twisted Manhole (new)", "twisted.conch.manhole_tap", ("An interactive remote debugger service accessible via telnet " "and ssh and providing syntax coloring and basic line editing " "functionality."), "manhole")
# Copyright (c) Moshe Zadka # See LICENSE for details. from twisted.application.service import ServiceMaker serviceMaker = ServiceMaker( "Web-based write-only editor", "nanoauto.web", "An editor which allows writing only", "nanoauto", )
from twisted.application.service import ServiceMaker CustomInterpreter = ServiceMaker( "Twisted Manhole with custom interpreter", "mypkg.interp", ("An interactive remote debugger service accessible via telnet " "and ssh and providing syntax coloring and basic line editing " "functionality."), "interp")
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from zope.interface import classProvides from twisted.plugin import IPlugin from twisted.application.service import ServiceMaker from twisted.words import iwords NewTwistedWords = ServiceMaker("New Twisted Words", "twisted.words.tap", "A modern words server", "words") TwistedXMPPRouter = ServiceMaker("XMPP Router", "twisted.words.xmpproutertap", "An XMPP Router server", "xmpp-router") class RelayChatInterface(object): classProvides(IPlugin, iwords.IProtocolPlugin) name = 'irc' def getFactory(cls, realm, portal): from twisted.words import service return service.IRCFactory(realm, portal) getFactory = classmethod(getFactory) class PBChatInterface(object): classProvides(IPlugin, iwords.IProtocolPlugin)
# myapp from twisted.application.service import ServiceMaker OpenMail = ServiceMaker("OpenMail", "openmail.mytap", "A k-v db based email service", "openmail")
# -*- coding: utf-8 -*- from twisted.application.service import ServiceMaker MindPoolSiteService = ServiceMaker("MindPool, Inc. Web Site", "mindpoolsite.app", "MindPool, Inc. Web Site", "mindpool-site")
from twisted.application.service import ServiceMaker Sample = ServiceMaker("fakeemail", "fakeemail.server", "Fake Email server", "fakeemail")
from twisted.application.service import ServiceMaker APNSD_Plugin = ServiceMaker( "APNS Daemon", "apnsd.tap", """A daemon for relaying requests to the Apple Push Notification Server in a simple and easy way.""", "apnsd" )
from twisted.application.service import ServiceMaker finger = ServiceMaker("finger", "finger.tap", "Run a finger service", "finger")
from twisted.application.service import ServiceMaker ExiftoolProxyService = ServiceMaker( "Exiftool Proxy Service", "exifproxy.service", "Metadata extraction reverse proxy based on exiftool", "exifproxy")
from twisted.application.service import ServiceMaker serviceMaker = ServiceMaker('Server.', 'server.server', 'Data collector server.', 'server')
# Copyright (c) Ralph Meijer. # See LICENSE for details. from twisted.application.service import ServiceMaker WokkelXMPPComponentServer = ServiceMaker("XMPP Component Server", "wokkel.componentservertap", "An XMPP Component Server", "wokkel-component-server")
# Copyright (c) Ralph Meijer. # See LICENSE for details. try: from twisted.application.service import ServiceMaker except ImportError: from twisted.scripts.mktap import _tapHelper as ServiceMaker Idavoll = ServiceMaker( "Idavoll HTTP", "idavoll.tap_http", "Jabber Publish-Subscribe Service Component with HTTP gateway", "idavoll-http")
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedWeb = ServiceMaker( "Twisted Web", "twisted.web.tap", ( "A general-purpose web server which can serve from a " "filesystem or application resource." ), "web", )
# Copyright (c) Mochi Media, Inc. # Copyright (c) Ralph Meijer. # See LICENSE for details. """ Twisted Plugins for udplog services. """ from __future__ import division, absolute_import from twisted.application.service import ServiceMaker UDPLogServer = ServiceMaker( "UDPLog Server", "udplog.tap", "A service that accepts structured logs via UDP and dispatches them to " "Scribe or RabbitMQ.", "udplog")
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedINETD = ServiceMaker( "Twisted INETD Server", "twisted.runner.inetdtap", "An inetd(8) replacement.", "inetd")
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedProcmon = ServiceMaker("Twisted Process Monitor", "twisted.runner.procmontap", ("A process watchdog / supervisor"), "procmon")
from twisted.application.service import ServiceMaker Tracking = ServiceMaker("trakr simple http tracking", "trakr.tap", "tracking - unsweetened", "trakr")
# # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # ############################################################################### from twisted.application.service import ServiceMaker serviceMaker = ServiceMaker('endpointforward', 'autobahn.twisted.forwarder', 'A simple stream endpoint forwarder', 'endpointforward')
""" Defines serviceMaker, which required for automatic twistd integration for swftp-sftp See COPYING for license information. """ from twisted.application.service import ServiceMaker serviceMaker = ServiceMaker( 'swftp-sftp', # name 'swftp.sftp.service', # module 'An SFTP Proxy Interface for Swift', # description 'swftp-sftp' # tap name )
from twisted.application.service import ServiceMaker bobbyService = ServiceMaker("Bobby Service/", "bobby.service", "Monitoring integration for Autoscale.", "bobby")