Skip to content

Commit 1c7a93c

Browse files
committed
[doc] [Community adapters] Improve constructor docstrings
1 parent 9da662c commit 1c7a93c

File tree

5 files changed

+28
-19
lines changed

5 files changed

+28
-19
lines changed

src/taoensso/sente/server_adapters/community/aleph.clj

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
(ns taoensso.sente.server-adapters.community.aleph
2-
"Sente server adapter for Aleph,
3-
Ref. <https://github.com/clj-commons/aleph>."
42
{:author "Soren Macbeth (@sorenmacbeth)"}
53
(:require
64
[taoensso.sente.interfaces :as i]
@@ -44,7 +42,10 @@
4442
{:body s})))))
4543

4644
(defn get-sch-adapter
47-
"Supports websocket-connection options in `aleph.http`.
48-
If no option map is provided, the default options apply."
45+
"Returns a Sente `ServerChan` adapter for `Aleph`,
46+
Ref. <https://github.com/clj-commons/aleph>.
47+
48+
Supports websocket-connection options as in `aleph.http`.
49+
If no options map is provided, the default options apply."
4950
([ ] (AlephAsyncNetworkChannelAdapter. nil))
5051
([opts] (AlephAsyncNetworkChannelAdapter. opts)))

src/taoensso/sente/server_adapters/community/immutant.clj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
(ns taoensso.sente.server-adapters.community.immutant
2-
"Sente server adapter for Immutant v2+,
3-
Ref. <https://github.com/immutant/immutant>."
42
{:author "Toby Crawley (@tobias)"}
53
(:require
64
[taoensso.encore :as enc]
@@ -31,7 +29,10 @@
3129
(fn [sch {:keys [code reason] :as status-map}]
3230
(on-close sch ws? status-map)))))))
3331

34-
(defn get-sch-adapter [] (ImmutantServerChanAdapter.))
32+
(defn get-sch-adapter
33+
"Returns a Sente `ServerChan` adapter for `Immutant` v2+,
34+
Ref. <https://github.com/immutant/immutant>."
35+
[] (ImmutantServerChanAdapter.))
3536

3637
(enc/deprecated
3738
(defn ^:deprecated ^:no-doc make-immutant-adapter [_opts] (get-sch-adapter))

src/taoensso/sente/server_adapters/community/jetty.clj

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
(ns taoensso.sente.server-adapters.community.jetty
2-
"Sente adapter for `ring-jetty-adapter`,
3-
Ref. <https://github.com/ring-clojure/ring/tree/master/ring-jetty-adapter>.
4-
Adapted from <https://github.com/taoensso/sente/pull/426#issuecomment-1647231979>."
52
{:author "Alex Gunnarson (@alexandergunnarson)"}
63
(:require
74
[ring.core.protocols :as ring-protocols]
@@ -104,8 +101,14 @@
104101
(ring-response/response (ajax-ch callbacks-map adapter-opts)))))
105102

106103
(defn get-sch-adapter
107-
"Returns an Jetty ServerChanAdapter. Options:
108-
`:ajax-resp-timeout-ms` - Max msecs to wait for Ajax responses (default 60 secs)"
104+
"Returns a Sente `ServerChan` adapter for `ring-jetty-adapter` [1].
105+
Supports Jetty 11.
106+
107+
Options:
108+
`:ajax-resp-timeout-ms` - Max msecs to wait for Ajax responses (default 60 secs),
109+
exception thrown on timeout.
110+
111+
[1] Ref. <https://github.com/ring-clojure/ring/tree/master/ring-jetty-adapter>."
109112
([] (get-sch-adapter nil))
110113
([{:as opts
111114
:keys [ajax-resp-timeout-ms]

src/taoensso/sente/server_adapters/community/nginx_clojure.clj

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
(ns ^:no-doc taoensso.sente.server-adapters.community.nginx-clojure
22
;; `^:no-doc` needed to prevent broken cljdoc build
3-
"Sente server adapter for Nginx-Clojure v0.4.2+.
4-
Ref. <https://github.com/nginx-clojure/nginx-clojure>."
53
{:author "Zhang Yuexiang (@xfeep)"}
64
(:require
75
[taoensso.encore :as enc]
@@ -48,7 +46,10 @@
4846

4947
{:status 200 :body sch})))
5048

51-
(defn get-sch-adapter [] (NginxServerChanAdapter.))
49+
(defn get-sch-adapter
50+
"Returns a Sente `ServerChan` adapter for `Nginx-Clojure` v0.4.2+.
51+
Ref. <https://github.com/nginx-clojure/nginx-clojure>."
52+
[] (NginxServerChanAdapter.))
5253

5354
(enc/deprecated
5455
(def ^:deprecated ^:no-doc nginx-clojure-adapter (get-sch-adapter))

src/taoensso/sente/server_adapters/community/undertow.clj

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
(ns taoensso.sente.server-adapters.community.undertow
2-
"Sente server adapter for ring-undertow-adapter,
3-
Ref. <https://github.com/luminus-framework/ring-undertow-adapter>."
42
{:author "Nik Peric"}
53
(:require
64
[ring.adapter.undertow.websocket :as websocket]
@@ -89,8 +87,13 @@
8987
(ajax-ch callbacks-map adapter-opts))}))
9088

9189
(defn get-sch-adapter
92-
"Returns an Undertow ServerChanAdapter. Options:
93-
`:ajax-resp-timeout-ms` - Max msecs to wait for Ajax responses (default 60 secs)"
90+
"Returns a Sente `ServerChan` adapter for `ring-undertow-adapter` [1].
91+
92+
Options:
93+
`:ajax-resp-timeout-ms` - Max msecs to wait for Ajax responses (default 60 secs),
94+
exception thrown on timeout.
95+
96+
[1] Ref. <https://github.com/luminus-framework/ring-undertow-adapter>."
9497
([] (get-sch-adapter nil))
9598
([{:as opts
9699
:keys [ajax-resp-timeout-ms]

0 commit comments

Comments
 (0)