Source

callchain / callchain / active_auto / event.py

# -*- coding: utf-8 -*-
'''active auto-balancing event chains appconf'''

from appspace import appifies
from twoq.active import AutoResultMixin

from callchain.config import Defaults
from callchain.keys.apps import events
from callchain.root import EventRootMixin
from callchain.mixins import EventMixin
from callchain.route import Chains, Events
from callchain.keys.mixin import KEvent

###############################################################################
## thing event chain ##########################################################
###############################################################################


class thingevent:
    chain = 'callchain.active_auto.chainlet.chainlink'
    loads = 'callchain.services.loads.Loads'
    dumps = 'callchain.services.dumps.Dumps'
    logger = 'callchain.services.core.loglet'


thingevent = Events(thingevent, events, Defaults)


@appifies(KEvent)
@thingevent(thingevent, events, defaults=Defaults)
class eventchain(EventRootMixin, EventMixin, AutoResultMixin):

    '''active queued auto-balancing lite event chain'''


###############################################################################
## result event chain #########################################################
###############################################################################


class event(Chains, Defaults):
    chain = 'callchain.active_auto.chainlet.chainlink'
    loads = 'callchain.services.loads.Loads'
    dumps = 'callchain.services.dumps.Dumps'
    logger = 'callchain.services.core.loglet'
    filter = 'callchain.active_auto.eventlet.filterevent'
    collect = 'callchain.active_auto.eventlet.collectevent'
    combine = 'callchain.active_auto.eventlet.combineevent'
    set = 'callchain.active_auto.eventlet.setevent'
    slice = 'callchain.active_auto.eventlet.sliceevent'
    map = 'callchain.active_auto.eventlet.mapevent'
    delay = 'callchain.active_auto.eventlet.delayevent'
    repeat = 'callchain.active_auto.eventlet.repeatevent'
    order = 'callchain.active_auto.eventlet.orderevent'
    random = 'callchain.active_auto.eventlet.randomevent'
    reduce = 'callchain.active_auto.eventlet.reduceevent'
    math = 'callchain.active_auto.eventlet.mathevent'
    truth = 'callchain.active_auto.eventlet.truthevent'


event = Events(event, events, Defaults)


@appifies(KEvent)
@event(event, events, defaults=Defaults)
class eventq(EventRootMixin, EventMixin, AutoResultMixin):

    '''active queued auto-balancing event chain'''