Skip to content

Commit

Permalink
Update documentation (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Dec 10, 2019
1 parent 3f0edba commit b816666
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"sphinx-jsonschema",
]

autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
20 changes: 15 additions & 5 deletions sphinx/source/users/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,31 @@ CCF provides two client implementations (C++ and Python).
C++ Client
----------

.. doxygenclass:: RpcTlsClient
.. doxygenclass:: JsonRpcTlsClient
:project: CCF
:members:

Alternatively, the ``SigRpcTlsClient`` can be used to issue signed requests (useful for governance).
Alternatively, the ``SigJsonRpcTlsClient`` can be used to issue signed requests (useful for governance).

.. doxygenclass:: SigRpcTlsClient
.. doxygenclass:: SigJsonRpcTlsClient
:project: CCF
:members:

Python Client
-------------

Available as part of CCF Python infra: https://github.com/microsoft/CCF/blob/master/tests/infra/jsonrpc.py.
Available as part of CCF Python infra: https://github.com/microsoft/CCF/blob/master/tests/infra/clients.py.

The ``Checker`` class in `ccf.py <https://github.com/microsoft/CCF/blob/master/tests/infra/ccf.py>`_ can be used as a wrapper to wait for requests to be committed.

.. warning:: The Python client does not yet support signed requests.
HTTP
----

HTTP support is now available experimentally in CCF. To enable it, follow the standard build procedure, and passing `-DHTTP=ON` to cmake.

Testcases will automatically switch to using the appropriate clients.
The CCF Python infra client can be used without any modifications other than exporting the ``HTTP`` environment variable.
By default, the Python infra uses `requests <https://realpython.com/python-requests/>`_, but exporting the ``CURL_CLIENT`` environment variable will switch to a ``curl``-based client instead.

The ``start_test_network.sh`` script documented in :ref:`Quickstart` defaults to using ``curl``.
A simple ``scurl.sh`` wrapper script is automatically generated under ``build/``, and allows sending signed requests to CCF.

0 comments on commit b816666

Please sign in to comment.