mitogen/docs/api.rst

115 lines
2.1 KiB
ReStructuredText
Raw Normal View History

2016-08-12 17:45:26 +00:00
API Reference
2016-08-13 23:16:17 +00:00
*************
Package Layout
==============
2017-09-11 04:08:28 +00:00
mitogen Package
---------------
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
.. automodule:: mitogen
2016-08-13 23:16:17 +00:00
.. autodata:: mitogen.is_master
2017-09-11 04:08:28 +00:00
.. autodata:: mitogen.context_id
.. autodata:: mitogen.parent_id
2017-09-07 11:08:05 +00:00
2016-08-12 17:45:26 +00:00
2017-09-11 04:08:28 +00:00
mitogen.core
------------
2016-08-12 17:45:26 +00:00
2017-09-11 04:08:28 +00:00
.. automodule:: mitogen.core
2016-08-13 23:16:17 +00:00
.. function:: mitogen.core.takes_econtext
Decorator that marks a function or class method to automatically receive a
kwarg named `econtext`, referencing the
:py:class:`econtext.core.ExternalContext` active in the context in which
the function is being invoked in. The decorator is only meaningful when the
function is invoked via :py:data:`econtext.core.CALL_FUNCTION`.
When the function is invoked directly, `econtext` must still be passed to it
explicitly.
.. function:: mitogen.core.takes_router
Decorator that marks a function or class method to automatically receive a
kwarg named `router`, referencing the :py:class:`econtext.core.Router`
active in the context in which the function is being invoked in. The
decorator is only meaningful when the function is invoked via
:py:data:`econtext.core.CALL_FUNCTION`.
When the function is invoked directly, `router` must still be passed to it
explicitly.
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
mitogen.master
--------------
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
.. automodule:: mitogen.master
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
mitogen.fakessh
2017-09-07 11:08:05 +00:00
---------------
2017-09-11 04:08:28 +00:00
.. automodule:: mitogen.fakessh
2017-09-11 04:08:28 +00:00
.. autofunction:: mitogen.fakessh.run
2017-09-07 11:08:05 +00:00
Router Class
============
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.master.Router
2017-09-07 11:08:05 +00:00
:members:
:inherited-members:
Broker Class
============
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.master.Broker
:members:
:inherited-members:
2016-08-13 23:16:17 +00:00
Context Class
=============
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.master.Context
2016-08-13 23:16:17 +00:00
:members:
:inherited-members:
2016-08-13 23:16:17 +00:00
Channel Class
-------------
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.core.Channel
2016-08-12 17:45:26 +00:00
:members:
Context Class
-------------
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.master.Context
2016-08-13 23:16:17 +00:00
:members:
Utility Functions
=================
2016-08-13 23:16:17 +00:00
2017-09-11 04:08:28 +00:00
.. automodule:: mitogen.utils
2016-08-13 23:16:17 +00:00
:members:
Exceptions
==========
2017-09-11 04:08:28 +00:00
.. autoclass:: mitogen.core.Error
.. autoclass:: mitogen.core.CallError
.. autoclass:: mitogen.core.ChannelError
.. autoclass:: mitogen.core.StreamError
.. autoclass:: mitogen.core.TimeoutError