| 1 |
Managing proxied gateways |
| 2 |
========================== |
| 3 |
|
| 4 |
Simple proxying |
| 5 |
---------------- |
| 6 |
|
| 7 |
Using the ``via`` arg of specs we can create a gateway |
| 8 |
whose io is created on a remote gateway and proxied to the master. |
| 9 |
|
| 10 |
The simplest use case, is where one creates one master process |
| 11 |
and uses it to control new workers and their environment |
| 12 |
|
| 13 |
:: |
| 14 |
|
| 15 |
>>> import execnet |
| 16 |
>>> group = execnet.Group() |
| 17 |
>>> group.defaultspec = 'popen//via=master' |
| 18 |
>>> master = group.makegateway('popen//id=master') |
| 19 |
>>> master |
| 20 |
<Gateway id='master' receive-live, thread model, 0 active channels> |
| 21 |
>>> worker = group.makegateway() |
| 22 |
>>> worker |
| 23 |
<Gateway id='gw0' receive-live, thread model, 0 active channels> |
| 24 |
>>> group |
| 25 |
<Group ['master', 'gw0']> |