Include docstrings in published docs
Change-Id: Icdfb0535b26162d39c3af683b7729b5e834d89b9
This commit is contained in:
parent
3e8c891d67
commit
837aa03c43
18
doc/source/exceptions.rst
Normal file
18
doc/source/exceptions.rst
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
----------
|
||||||
|
Exceptions
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autoexception:: ClientSendError
|
||||||
|
.. autoexception:: DriverLoadFailure
|
||||||
|
.. autoexception:: ExecutorLoadFailure
|
||||||
|
.. autoexception:: InvalidTransportURL
|
||||||
|
.. autoexception:: MessagingException
|
||||||
|
.. autoexception:: MessagingTimeout
|
||||||
|
.. autoexception:: MessagingServerError
|
||||||
|
.. autoexception:: NoSuchMethod
|
||||||
|
.. autoexception:: RPCDispatcherError
|
||||||
|
.. autoexception:: RPCVersionCapError
|
||||||
|
.. autoexception:: ServerListenError
|
||||||
|
.. autoexception:: UnsupportedVersion
|
@ -5,12 +5,18 @@ The Oslo messaging API supports RPC and notifications over a number of
|
|||||||
different messsaging transports.
|
different messsaging transports.
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
--------
|
========
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
api/autoindex
|
transport
|
||||||
|
target
|
||||||
|
server
|
||||||
|
rpcclient
|
||||||
|
notifier
|
||||||
|
serializer
|
||||||
|
exceptions
|
||||||
|
|
||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
8
doc/source/notifier.rst
Normal file
8
doc/source/notifier.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
--------
|
||||||
|
Notifier
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autoclass:: Notifier
|
||||||
|
:members:
|
8
doc/source/rpcclient.rst
Normal file
8
doc/source/rpcclient.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
----------
|
||||||
|
RPC Client
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autoclass:: RPCClient
|
||||||
|
:members:
|
10
doc/source/serializer.rst
Normal file
10
doc/source/serializer.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
----------
|
||||||
|
Serializer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autoclass:: Serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: NoOpSerializer
|
14
doc/source/server.rst
Normal file
14
doc/source/server.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
------
|
||||||
|
Server
|
||||||
|
------
|
||||||
|
|
||||||
|
.. automodule:: oslo.messaging.rpc.server
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autofunction:: get_rpc_server
|
||||||
|
|
||||||
|
.. autoclass:: RPCDispatcher
|
||||||
|
|
||||||
|
.. autoclass:: MessageHandlingServer
|
||||||
|
:members:
|
7
doc/source/target.rst
Normal file
7
doc/source/target.rst
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
------
|
||||||
|
Target
|
||||||
|
------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autoclass:: Target
|
11
doc/source/transport.rst
Normal file
11
doc/source/transport.rst
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---------
|
||||||
|
Transport
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. currentmodule:: oslo.messaging
|
||||||
|
|
||||||
|
.. autofunction:: get_transport
|
||||||
|
|
||||||
|
.. autoclass:: Transport
|
||||||
|
|
||||||
|
.. autofunction:: set_transport_defaults
|
@ -13,11 +13,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
__all__ = ['get_rpc_server']
|
|
||||||
|
|
||||||
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
|
|
||||||
from oslo.messaging import server as msg_server
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
An RPC server exposes a number of endpoints, each of which contain a set of
|
An RPC server exposes a number of endpoints, each of which contain a set of
|
||||||
methods which may be invoked remotely by clients over a given transport.
|
methods which may be invoked remotely by clients over a given transport.
|
||||||
@ -25,7 +20,7 @@ methods which may be invoked remotely by clients over a given transport.
|
|||||||
To create an RPC server, you supply a transport, target and a list of
|
To create an RPC server, you supply a transport, target and a list of
|
||||||
endpoints.
|
endpoints.
|
||||||
|
|
||||||
A transport can be obtained simply by calling the get_transport() method:
|
A transport can be obtained simply by calling the get_transport() method::
|
||||||
|
|
||||||
transport = messaging.get_transport(conf)
|
transport = messaging.get_transport(conf)
|
||||||
|
|
||||||
@ -48,7 +43,7 @@ complete.
|
|||||||
An RPC server class is provided for each supported I/O handling framework.
|
An RPC server class is provided for each supported I/O handling framework.
|
||||||
Currently BlockingRPCServer and eventlet.RPCServer are available.
|
Currently BlockingRPCServer and eventlet.RPCServer are available.
|
||||||
|
|
||||||
A simple example of an RPC server with multiple endpoints might be:
|
A simple example of an RPC server with multiple endpoints might be::
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
@ -94,6 +89,11 @@ return values from the methods. By supplying a serializer object, a server can
|
|||||||
deserialize arguments from - serialize return values to - primitive types.
|
deserialize arguments from - serialize return values to - primitive types.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__all__ = ['get_rpc_server']
|
||||||
|
|
||||||
|
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
|
||||||
|
from oslo.messaging import server as msg_server
|
||||||
|
|
||||||
|
|
||||||
def get_rpc_server(transport, target, endpoints,
|
def get_rpc_server(transport, target, endpoints,
|
||||||
executor='blocking', serializer=None):
|
executor='blocking', serializer=None):
|
||||||
|
@ -22,7 +22,7 @@ class Target(object):
|
|||||||
should be sent or what messages a server is listening for.
|
should be sent or what messages a server is listening for.
|
||||||
|
|
||||||
Different subsets of the information encapsulated in a Target object is
|
Different subsets of the information encapsulated in a Target object is
|
||||||
relevant to various aspects of the API::
|
relevant to various aspects of the API:
|
||||||
|
|
||||||
creating a server:
|
creating a server:
|
||||||
topic and server is required; exchange is optional
|
topic and server is required; exchange is optional
|
||||||
|
Loading…
Reference in New Issue
Block a user