From 4477895b420b05c30232a71e6a1fea51938e5223 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Tue, 24 Sep 2013 15:49:38 +0200 Subject: [PATCH] Connection Layer docs --- docs/connection.rst | 17 +++++++++++++++++ elasticsearch/connection_pool.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/connection.rst b/docs/connection.rst index 0c10bb26..621660a4 100644 --- a/docs/connection.rst +++ b/docs/connection.rst @@ -1,6 +1,16 @@ Connection Layer API ==================== +All of the classes reponsible for handling the connection to the Elasticsearch +cluster. The default subclasses used can be overriden by passing parameters to the +:class:`~elasticsearch.Elasticsearch` class. All of the arguments to the client +will be passed on to :class:`~elasticsearch.Transport`, +:class:`~elasticsearch.ConnectionPool` and :class:`~elasticsearch.Connection`. + +For example if you wanted to use your own implementation of the +:class:`~elasticsearch.ConnectionSelector` class you can just pass in the +`selector_class` parameter. + .. py:module:: elasticsearch Transport @@ -17,6 +27,13 @@ Connection Pool :members: +Connection Selector +------------------- + +.. autoclass:: ConnectionSelector(opts) + :members: + + Connection ---------- diff --git a/elasticsearch/connection_pool.py b/elasticsearch/connection_pool.py index c443d665..be359bfe 100644 --- a/elasticsearch/connection_pool.py +++ b/elasticsearch/connection_pool.py @@ -26,7 +26,7 @@ class ConnectionSelector(object): """ def __init__(self, opts): """ - :arg opts: dictionary of connection instances and theit options + :arg opts: dictionary of connection instances and their options """ self.connection_opts = opts