David Wilson
6670cba41c
Introduce handler policy functions; closes #138 .
...
Now you can specify a function to add_handler() that authenticates the
message header, with has_parent_authority() and is_immediate_child()
built in.
2018-03-29 21:40:33 +05:45
David Wilson
80a97fbc9b
core: Rename Sender.put() to Sender.send().
...
Been annoying me for months.
2018-03-29 15:43:48 +05:45
David Wilson
b48d63f33b
docs: add to_sender() and update serialization notes
2018-03-29 15:38:44 +05:45
David Wilson
8676c40674
core: make _start_transmit / _stop_transmit async-only
...
For now at least, these APIs are always used in an asynchronous context,
so stop using the defer mechanism.
2018-03-29 15:10:43 +05:45
David Wilson
4903052f42
fork: reseed Python/SSL PRNGs
...
Mac's SSL seems to have a pthread_atfork handler or similar that does
this for us, no clue if Linux is the same.
2018-03-27 11:58:17 +05:45
David Wilson
7f4368db87
docs: pad out signal handlers note
2018-03-27 11:38:48 +05:45
David Wilson
0dbb63ae3d
docs: typo
2018-03-26 16:45:25 +05:45
David Wilson
2813d1a968
docs: update
2018-03-25 14:58:20 +05:45
David Wilson
5579ac936b
issue #155 : docs: more fork() liability warnings
2018-03-25 10:08:46 +05:45
David Wilson
f457f54758
docs: fix formatting
2018-03-24 22:16:06 +05:45
David Wilson
d370290687
docs: one more warning
2018-03-24 22:15:24 +05:45
David Wilson
03e08e25fd
docs: put huge liability notice in fork() docs.
2018-03-24 22:13:36 +05:45
David Wilson
48351a1889
issue #155 : parent: support Context.shutdown(), reap children on exit.
...
This permits graceful shutdown of individual contexts, without tearing
down everything.
Update mitogen.parent.Stream to also wait for the child to exit, to
prevent the buildup of zombie processes. This introduces a blocking wait
for process exit on the Broker thread, let's see if we can get away with
it. Chances are reasonable that it'll cause needless hangs on heavily
loaded machines.
2018-03-24 19:19:51 +05:45
David Wilson
6a74edce6b
issue #155 : parent: move master.Context into parent.
...
The Context and Router APIs for constructing children and making
function calls should be available in every parent context, as user code
wants to have access to the same API.
2018-03-24 19:19:45 +05:45
David Wilson
20780820a6
docs: typo
2018-03-24 15:58:42 +05:45
David Wilson
75b9e1d71e
issue #155 : docs: document behaviour of forked children
2018-03-24 15:57:03 +05:45
David Wilson
1a8ac9f4d1
issue #155 : introduce mitogen.fork / Router.fork()
2018-03-24 15:50:28 +05:45
David Wilson
f241eac5ce
parent: allow Python to determine its install prefix from argv[0]
...
Fixes support for virtualenv. Closes #152 .
2018-03-19 21:58:35 +05:45
David Wilson
4f361be7e7
issue #144 : teach Select() to close its latch
...
Causes all threads sleeping on the select to wake.
2018-03-19 21:58:35 +05:45
David Wilson
8aada2646c
core: support throwing LatchError in every sleeping thread
...
This is to allow Select() to be used as a generic queueing primitive
that supports graceful shutdown.
2018-03-19 21:58:35 +05:45
David Wilson
b2a433dcc4
ssh: CompressionLevel is a v1-only option.
...
It's ignored by newer SSHes, which only pay attention to Compression.
2018-03-19 21:58:33 +05:45
David Wilson
235e1df987
sudo: support parsing sudo flags back out into parameters
2018-03-19 21:58:32 +05:45
David Wilson
7cf2edc3a8
ansible: Support many more common playbook variables.
2018-03-19 21:58:32 +05:45
David Wilson
14251539cd
docs: Docker typo.
2018-03-19 21:58:31 +05:45
David Wilson
5036a9448f
Add Docker method.
2018-03-19 21:58:31 +05:45
David Wilson
b221eaaa10
ansible: log call timings
2018-03-19 21:58:30 +05:45
David Wilson
91116810a1
ansible: delete utils.py and promote cast() to mitogen.utils
2018-03-19 21:58:30 +05:45
David Wilson
bdd8648bae
ssh: enable compression by default
...
Using the same test as in 7af97c0365
,
transmitted wire bytes drops from 135,531 to 133,071 (-1.81%), while
received drops from 21,073 to 14,775 (-30%).
Combined, both changes shave 13,914 bytes (-8.6%) off aggregate
bandwidth usage.
Make it configurable as compression hurts in some scenarios.
2018-03-19 21:58:29 +05:45
David Wilson
71a6b9e32a
master: Select.all() sugar
2018-03-19 21:58:29 +05:45
Alex Willmer
a69d9650ad
Fix indentation of Router.route anchor
2018-03-19 21:58:29 +05:45
Alex Willmer
eb1ad66469
docs: Fix out of date get_data() snippets
...
As of adc8fe3aed
Receiver objects do not
have a get_data() method and Receiver.get() does not unpickle the
message.
2018-03-19 21:58:29 +05:45
David Wilson
e63e9d299e
docs: add Message documentation
2018-03-19 21:58:28 +05:45
David Wilson
dd088908df
select: clean up API.
2018-03-19 21:58:28 +05:45
David Wilson
07d4d799f1
Add mitogen.main() decorator mainly for docs and demo use.
2018-03-19 21:58:28 +05:45
David Wilson
09eb3fd9ba
utils: support log_to_file(usec=True)
2018-03-19 21:58:28 +05:45
David Wilson
f1f36cec35
Simplify the API, make Broker optional and auto-shutdown on main thread exit.
2018-03-19 21:58:28 +05:45
David Wilson
b1ad04330b
docs: move Router.route() into Sphinx.
2018-03-19 21:58:27 +05:45
David Wilson
fb759f7c16
docs: move Broker docstrings into Sphinx.
2018-03-19 21:58:27 +05:45
David Wilson
ffa063cc01
docs: annother barriage of cross-reference fixes.
2018-03-19 21:58:25 +05:45
David Wilson
9372d2c3de
docs: Fix up tons of references, document trust chain
2018-03-19 21:35:38 +05:45
David Wilson
0299f86bc9
docs: fix reference to with:
2018-03-19 21:35:37 +05:45
David Wilson
c9daa2ff30
docs: move fakessh docs into Sphinx.
2018-03-19 21:35:37 +05:45
David Wilson
6a10ab605e
docs: move mitogen.utils docs to Sphinx.
2018-03-19 21:35:37 +05:45
David Wilson
270b242ec5
docs: fix decorator types.
2018-03-19 21:35:37 +05:45
David Wilson
416ab90e02
docs: Fix index generation everywhere.
2018-03-19 21:35:37 +05:45
David Wilson
12fe884f1a
Reference Select
2018-03-19 21:35:37 +05:45
David Wilson
83e3e1b82a
Typo.
2018-03-19 21:35:37 +05:45
David Wilson
e9af841e60
docs: fix :return: syntax.
2018-03-19 21:35:36 +05:45
David Wilson
f1d82c7284
More API documentation.
2018-03-19 21:35:36 +05:45
David Wilson
5772e06368
Typo.
2018-03-19 21:35:36 +05:45