Source

callchain / callchain / queue / lazy / eventlet.py

Full commit
# -*- coding: utf-8 -*-
'''lazy auto-balancing eventlets'''

from appspace import key
from knife.lazy import OutMixin
from knife.mixins import (
    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
    MathMixin, ReduceMixin)

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


class eventlet(Eventlet, OutMixin):

    '''eventlet'''


@key(keys.KDelay)
class cmplet(Eventlet, OutMixin, CmpMixin):

    '''delayed mapping eventlet'''


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

    '''repeat eventlet'''


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

    '''mapping eventlet'''


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

    '''slicing eventlet'''


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

    '''filtering eventlet'''


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

    '''ordering eventlet'''


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

    '''mathing eventlet'''


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

    '''reducing eventlet'''