Source

callchain / callchain / queue / activeauto / eventlet.py

# -*- coding: utf-8 -*-
'''active auto-balancing eventlets'''

from appspace import key
from twoq.active import AutoQMixin
from twoq.mapping import DelayMixin, RepeatMixin, MapMixin
from twoq.reducing import MathMixin, TruthMixin, ReduceMixin
from twoq.ordering import RandomMixin, OrderMixin, CombineMixin
from twoq.filtering import FilterMixin, CollectMixin, SetMixin, SliceMixin

from callchain.queue import keys
from callchain.chainlet.base import Eventlet


class eventlet(Eventlet, AutoQMixin):

    '''eventlet'''


@key(keys.KDelay)
class delaylet(Eventlet, AutoQMixin, DelayMixin):

    '''delayed mapping eventlet'''


@key(keys.KRepeat)
class repeatlet(Eventlet, AutoQMixin, RepeatMixin):

    '''repeat eventlet'''


@key(keys.KMap)
class maplet(Eventlet, AutoQMixin, MapMixin):

    '''mapping eventlet'''


@key(keys.KCollect)
class collectlet(Eventlet, AutoQMixin, CollectMixin):

    '''collecting eventlet'''


@key(keys.KSet)
class setlet(Eventlet, AutoQMixin, SetMixin):

    '''seting eventlet'''


@key(keys.KSlice)
class slicelet(Eventlet, AutoQMixin, SliceMixin):

    '''slicing eventlet'''


@key(keys.KFilter)
class filterlet(Eventlet, AutoQMixin, FilterMixin):

    '''filtering eventlet'''


@key(keys.KRandom)
class randomlet(Eventlet, AutoQMixin, RandomMixin):

    '''randomizing eventlet'''


@key(keys.KOrder)
class orderlet(Eventlet, AutoQMixin, OrderMixin):

    '''ordering eventlet'''


@key(keys.KMath)
class mathlet(Eventlet, AutoQMixin, MathMixin):

    '''mathing eventlet'''


@key(keys.KReduce)
class reducelet(Eventlet, AutoQMixin, ReduceMixin):

    '''reducing eventlet'''


@key(keys.KCombine)
class combinelet(Eventlet, AutoQMixin, CombineMixin):

    '''combining eventlet'''


@key(keys.KTruth)
class truthlet(Eventlet, AutoQMixin, TruthMixin):

    '''truthing eventlet'''
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.