1. Lynn Rees
  2. callchain

Source

callchain / callchain / queue / activeauto / chainlet.py

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

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 Chainlet


class chainlet(Chainlet, AutoQMixin):

    '''chainlet'''


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

    '''delayed mapping chainlet'''


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

    '''repeat chainlet'''


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

    '''mapping chainlet'''


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

    '''collecting chainlet'''


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

    '''seting chainlet'''


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

    '''slicing chainlet'''


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

    '''filtering chainlet'''


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

    '''randomizing chainlet'''


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

    '''ordering chainlet'''


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

    '''mathing chainlet'''


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

    '''reducing chainlet'''


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

    '''combining chainlet'''


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

    '''truthing chainlet'''