How to use the brewtils.plugin.PluginBase function in brewtils

To help you get started, we’ve selected a few brewtils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beer-garden / beer-garden / plugins / error / error / __main__.py View on Github external
def main():
    plugin = PluginBase(ErrorClient())
    plugin.run()
github beer-garden / beer-garden / plugins / complex / complex / __main__.py View on Github external
def main():
    if len(sys.argv) < 3:
        raise StartupError("2 arguments (host and port) are "
                           "required only %d was provided." % len(sys.argv))

    host = sys.argv[1]
    port = sys.argv[2]

    plugin = PluginBase(ComplexClient(host, port))
    plugin.run()
github beer-garden / beer-garden / plugins / multi-sleeper / multi_sleeper / __main__.py View on Github external
def main():
    args = sys.argv
    if len(args) < 1:
        try:
            number_of_times_to_sleep = int(args[0])
        except (ValueError, TypeError):
            number_of_times_to_sleep = None
    else:
        number_of_times_to_sleep = None

    plugin = PluginBase(SleeperClient(number_of_times_to_sleep), max_concurrent=5)
    plugin.run()
github beer-garden / beer-garden / plugins / dynamic / main.py View on Github external
def main():
    plugin = PluginBase(DynamicClient())
    plugin.run()
github beer-garden / beer-garden / plugins / sleeper / sleeper / __main__.py View on Github external
def main():
    args = sys.argv
    if len(args) < 1:
        try:
            number_of_times_to_sleep = int(args[0])
        except (ValueError, TypeError):
            number_of_times_to_sleep = None
    else:
        number_of_times_to_sleep = None

    plugin = PluginBase(SleeperClient(number_of_times_to_sleep))
    plugin.run()
github beer-garden / beer-garden / bg_utils / local_plugin.py View on Github external
import warnings

from brewtils.plugin import PluginBase


class LocalPlugin(PluginBase):
    pass


class SimpleLocalPlugin(LocalPlugin):
    """Simple Local Plugin for use by Plugin developers"""

    def __init__(self, client, logger=None):
        super(SimpleLocalPlugin, self).__init__(
            client, logger=logger, multithreaded=False
        )
        warnings.warn(
            "Call made to 'SimpleLocalPlugin'. This name will be removed "
            "in version 3.0, please use 'LocalPlugin' instead.",
            DeprecationWarning,
            stacklevel=2,
        )
github beer-garden / beer-garden / plugins / echo / echo / __main__.py View on Github external
def main():
    plugin = PluginBase(EchoClient())
    plugin.run()
github beer-garden / beer-garden / plugins / custom-display / main.py View on Github external
def main():
    plugin = PluginBase(CustomDisplayClient())
    plugin.run()