diff options
author | adamw <adam@warski.org> | 2017-10-12 18:21:00 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-10-12 18:21:00 +0200 |
commit | 7885188a982c193e26f8ca6bc9aea8f6a642b32d (patch) | |
tree | 3dc9af024fabf67716902709e98743111d004a97 /docs/backends | |
parent | 17967df3414c19bfc7bd726ba9b26312a3c76437 (diff) | |
download | sttp-7885188a982c193e26f8ca6bc9aea8f6a642b32d.tar.gz sttp-7885188a982c193e26f8ca6bc9aea8f6a642b32d.tar.bz2 sttp-7885188a982c193e26f8ca6bc9aea8f6a642b32d.zip |
Docs: initial
Diffstat (limited to 'docs/backends')
-rw-r--r-- | docs/backends/start_stop.rst | 17 | ||||
-rw-r--r-- | docs/backends/summary.rst | 18 |
2 files changed, 35 insertions, 0 deletions
diff --git a/docs/backends/start_stop.rst b/docs/backends/start_stop.rst new file mode 100644 index 0000000..6cd6f13 --- /dev/null +++ b/docs/backends/start_stop.rst @@ -0,0 +1,17 @@ +Starting & cleaning up +====================== + +In case of most backends, you should only instantiate a backend once per +application, as a backend typically allocates resources such as thread or +connection pools. + +When ending the application, make sure to call ``backend.close()``, which will +free up resources used by the backend (if any). The close process might be +asynchronous, that is it can complete after the ``close()`` method returns. + +Note that only resources allocated by the backends are freed. For example, +if you use the ``AkkaHttpBackend()`` the ``close()`` method will terminate the +underlying actor system. However, if you have provided an existing actor system +upon backend creation (``AkkaHttpBackend.usingActorSystem``), the ``close()`` +method will be a no-op. + diff --git a/docs/backends/summary.rst b/docs/backends/summary.rst new file mode 100644 index 0000000..6aa0446 --- /dev/null +++ b/docs/backends/summary.rst @@ -0,0 +1,18 @@ +Supported backends +================== + +================================ ============================ ================================================ +Class Result wrapper Supported stream type +================================ ============================ ================================================ +``HttpURLConnectionBackend`` None (``Id``) n/a +``AkkaHttpBackend`` ``scala.concurrent.Future`` ``akka.stream.scaladsl.Source[ByteString, Any]`` +``AsyncHttpClientFutureBackend`` ``scala.concurrent.Future`` n/a +``AsyncHttpClientScalazBackend`` ``scalaz.concurrent.Task`` n/a +``AsyncHttpClientMonixBackend`` ``monix.eval.Task`` ``monix.reactive.Observable[ByteBuffer]`` +``AsyncHttpClientCatsBackend`` ``F[_]: cats.effect.Async`` n/a +``AsyncHttpClientFs2Backend`` ``F[_]: cats.effect.Async`` ``fs2.Stream[F, ByteBuffer]`` +``OkHttpSyncBackend`` None (``Id``) n/a +``OkHttpFutureBackend`` ``scala.concurrent.Future`` n/a +``OkHttpMonixBackend`` ``monix.eval.Task`` ``monix.reactive.Observable[ByteBuffer]`` +================================ ============================ ================================================ + |