Liking cljdoc? Tell your friends :D

salt.api


close-sseclj

(close-sse connection)
source

create-login-requestclj

(create-login-request {:keys [:salt.core/master-url :salt.core/username
                              :salt.core/password :salt.core/eauth]
                       :or {eauth "pam"}
                       :as opts})
source

create-requestclj

(create-request {:keys [:salt.core/master-url :url :method :headers
                        :content-type]
                 {:keys [:token]} :salt.core/login-response
                 :or {method :post content-type :json}
                 :as opts})
source

create-sse-requestclj

(create-sse-request {:keys [:salt.core/master-url :headers]
                     {:keys [:token]} :salt.core/login-response
                     :as opts})
source

ending-slashclj

source

http-requestclj

(http-request req resp-chan)
source

loginclj

(login req)

Executes login salt.http/request, handles exception, parses body and return new channel with response.

Prepends master-url and appends '/login' to ring request url. Request is retried with default backoff and retriable?. See salt.retry/with-retry for more details. Exception and parsed body is sent with channel and channel is closed afterwards. Request is aleph ring request with additonal keys:

KeyDescription
::salt.core/master-urlBase url of salt-master. Its prepended to ring :url
::salt.core/usernameUsername to be used in salt authetincation if any
::salt.core/passwordPassword to be used in salt authetincation if any
::salt.core/eauthEauth system to be used in salt authentication. Please refer saltstack documentation for available values
Executes login [[salt.http/request]], handles exception, parses body and return new channel with response.

Prepends master-url and appends '/login' to ring request url.
Request is retried with default backoff and retriable?. See [[salt.retry/with-retry]] for more details.
Exception and parsed body is sent with channel and channel is closed afterwards.
Request is aleph ring request with additonal keys:

| Key                      | Description |
| -------------------------| ------------|
| `::salt.core/master-url` | Base url of salt-master. Its prepended to ring :url
| `::salt.core/username`   | Username to be used in salt authetincation if any
| `::salt.core/password`   | Password to be used in salt authetincation if any
| `::salt.core/eauth`      | Eauth system to be used in salt authentication. Please refer saltstack documentation for available values
sourceraw docstring

logoutclj

(logout req)

Executes logout request with request function.

Executes logout request with [[request]] function.
sourceraw docstring

requestclj

(request req)

Executes salt.http/request, handles exception, parses body and return new channel with response.

Prepends master-url to ring request url. Request is retried with default backoff and retriable?. See salt.retry/with-retry for more details. Exception and parsed body is sent with channel and channel is closed afterwards. Request is aleph ring request with additonal keys:

KeyDescription
::salt.core/master-urlBase url of salt-master. Its prepended to ring :url
::salt.core/login-responseResponse from salt.api/login
Executes [[salt.http/request]], handles exception, parses body and return new channel with response.

Prepends master-url to ring request url.
Request is retried with default backoff and retriable?. See [[salt.retry/with-retry]] for more details.
Exception and parsed body is sent with channel and channel is closed afterwards.
Request is aleph ring request with additonal keys:

| Key                           | Description |
| ------------------------------| ------------|
| `::salt.core/master-url`      | Base url of salt-master. Its prepended to ring :url
| `::salt.core/login-response`  | Response from [[salt.api/login]]|
sourceraw docstring

sseclj

(sse req pool-opts sse-buffer-size)

Executes salt.http/request, handles exception, parses individual SSEs and return new channel emiting SSEs.

Prepends master-url and appends '/events' to ring request url. Request is retried with default backoff and retriable?. See salt.retry/with-retry for more details. If exception occurs, it is written to the channel and channel is closed. If SSE connection is closed, channel is closed. Request is aleph ring request with additonal keys

KeyDescription
::salt.core/master-urlBase url of salt-master. It is preepended :url
::salt.core/login-responseResponse from salt.api/login
Executes [[salt.http/request]], handles exception, parses individual SSEs  and return new channel emiting SSEs.

Prepends master-url and appends '/events' to ring request url.
Request is retried with default backoff and retriable?. See [[salt.retry/with-retry]] for more details.
If exception occurs, it is written to the channel and channel is closed.
If SSE connection is closed, channel is closed.
Request is aleph ring request with additonal keys

| Key                           | Description |
| ------------------------------| ------------|
| `::salt.core/master-url`      | Base url of salt-master. It is preepended :url
| `::salt.core/login-response`  | Response from [[salt.api/login]]
sourceraw docstring

starting-slashclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close