Source

callchain / callchain / lazy_man / eventlet.py

Full commit
# -*- coding: utf-8 -*-
'''lazy manually balanced eventlets'''

from appspace import appifies
from twoq.lazy import ManQMixin
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.chainlet import qkeys
from callchain.chainlet.base import Eventlet


class eventlet(Eventlet, ManQMixin):

    '''eventlet'''


@appifies(qkeys.KDelay)
class delaylet(Eventlet, ManQMixin, DelayMixin):

    '''delayed mapping eventlet'''


@appifies(qkeys.KRepeat)
class repeatlet(Eventlet, ManQMixin, RepeatMixin):

    '''repeat eventlet'''


@appifies(qkeys.KMap)
class maplet(Eventlet, ManQMixin, MapMixin):

    '''mapping eventlet'''


@appifies(qkeys.KCollect)
class collectlet(Eventlet, ManQMixin, CollectMixin):

    '''collecting eventlet'''


@appifies(qkeys.KSet)
class setlet(Eventlet, ManQMixin, SetMixin):

    '''seting eventlet'''


@appifies(qkeys.KSlice)
class slicelet(Eventlet, ManQMixin, SliceMixin):

    '''slicing eventlet'''


@appifies(qkeys.KFilter)
class filterlet(Eventlet, ManQMixin, FilterMixin):

    '''filtering eventlet'''


@appifies(qkeys.KRandom)
class randomlet(Eventlet, ManQMixin, RandomMixin):

    '''randomizing eventlet'''


@appifies(qkeys.KOrder)
class orderlet(Eventlet, ManQMixin, OrderMixin):

    '''ordering eventlet'''


@appifies(qkeys.KMath)
class mathlet(Eventlet, ManQMixin, MathMixin):

    '''mathing eventlet'''


@appifies(qkeys.KReduce)
class reducelet(Eventlet, ManQMixin, ReduceMixin):

    '''reducing eventlet'''


@appifies(qkeys.KCombine)
class combinelet(Eventlet, ManQMixin, CombineMixin):

    '''combining eventlet'''


@appifies(qkeys.KTruth)
class truthlet(Eventlet, ManQMixin, TruthMixin):

    '''truthing eventlet'''