Distributed cluster tools¶
Manage clients over a cluster of FreeSWITCH processes.
-
class
switchio.distribute.
MultiEval
(slaves, delegator=<class 'itertools.cycle'>, accessor='.')¶ Invoke arbitrary python expressions on a collection of objects
-
attrs
(obj)¶ Cache of obj attributes since python has no built in for getting them all…
-
evals
(expr, **kwargs)¶ Evaluate expression on all slave sub-components (Warning: this is the slowest call)
- expr: str
- python expression to evaluate on slave components
-
folder
(func, expr, **kwargs)¶ Same as reducer but takes in a binary function
-
partial
(expr, **kwargs)¶ Return a partial which will eval bytcode compiled from expr
-
reducer
(func, expr, itertype='', **kwargs)¶ Reduces the iter retured by evals(expr) into a single value using the reducer func
-
-
switchio.distribute.
SlavePool
(slaves)¶ A slave pool for controlling multiple (Client, EventListener) pairs with ease