Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: formatting docstrings #717

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/aleph/flow.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"Returns a [Dirigiste](https://github.com/clj-commons/dirigiste) object pool, which can be interacted
with via `acquire`, `release`, and `dispose`.

Param key | Description
| --- | ---
| `generate` | a single-arg funcion which takes a key, and returns an object which should be non-equal to any other generated object |
| `destroy` | an optional two-arg function which takes a key and object, and releases any associated resources |
| `stats-callback` | a function which will be invoked every `control-period` with a map of keys onto associated statistics |
| `max-queue-size` | the maximum number of pending acquires per key that are allowed before `acquire` will start to throw a `java.util.concurrent.RejectedExecutionException`.
| `sample-period` | the interval, in milliseconds, between sampling the state of the pool for resizing and gathering statistics, defaults to `10`.
| `control-period` | the interval, in milliseconds, between use of the controller to adjust the size of the pool, defaults to `10000`.
| `controller` | a Dirigiste controller that is used to gide the pool's size."
| Param | Description |
| ---------------- | -------------------------------------------------------------------------------------------- |
| `generate` | A single-arg function which takes a key and returns an object. Should not equal any other generated object. |
| `destroy` | An optional two-arg function which releases any associated resources. |
| `stats-callback` | A function invoked every `control-period` with a map of keys onto associated statistics. |
| `max-queue-size` | The maximum number of pending acquires per key. |
| `sample-period` | The interval in milliseconds between sampling the pool's state. Defaults to `10`. |
| `control-period` | The interval in milliseconds between controller use to adjust pool size. Defaults to `10000`.|
| `controller` | A Dirigiste controller used to guide the pool's size. |"
[{:keys
[generate
destroy
Expand Down Expand Up @@ -66,7 +66,7 @@
TimeUnit/MILLISECONDS)))

(defn acquire
"Acquires an object from the pool for key `k`, returning a deferred containing the object. May
"Acquires an object from the pool for key `k`, returning a deferred containing the object. May
throw a `java.util.concurrent.RejectedExecutionException` if there are too many pending acquires."
[^IPool p k]
(let [d (d/deferred nil)]
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/http.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(java.util.concurrent TimeoutException)))

(defn start-server
"Starts an HTTP server using the provided Ring `handler`. Returns a server
"Starts an HTTP server using the provided Ring `handler`. Returns a server
object which can be stopped via `java.io.Closeable.close()`, and whose port
can be discovered with `aleph.netty/port` if not set.

Expand Down