Liking cljdoc? Tell your friends :D

exoscale.compute.api.http

HTTP support for the Exoscale Compute API

HTTP support for the Exoscale Compute API
raw docstring

default-clientclj

source

default-endpointclj

Default HTTP endpoint for the Exoscale API

Default HTTP endpoint for the Exoscale API
sourceraw docstring

default-http-optsclj

Default HTTP options passed to the underlying HTTP library (aleph).

Default HTTP options passed to the underlying HTTP library (aleph).
sourceraw docstring

default-max-pollsclj

Default number of times to poll before timing out

Default number of times to poll before timing out
sourceraw docstring

default-page-sizeclj

Number of records to fetch by default

Number of records to fetch by default
sourceraw docstring

default-poll-intervalclj

Default timeout for async requests

Default timeout for async requests
sourceraw docstring

extract-responseclj

(extract-response resp opcode)

From a response get the result data

From a response get the result data
sourceraw docstring

find-payloadclj

(find-payload resp opcode)
source

job-loop!!clj

(job-loop!! config)
source

job-request!!clj

(job-request!! config opcode params)
source

json-request!!clj

(json-request!! config opcode params)
source

list-command?clj

source

list-request!!clj

(list-request!! config opcode {:keys [page pagesize] :or {page 1} :as params})

Perform a paging request. Elements are fetched by chunks of 500. If both page and pagesize are provided then we return a single page only, Otherwise fetch all results page by page.

This functionality is dependent on the api call supporting pagination, listZones and listSecurityGroups are examples of this.

Custom Exoscale commands that are not present in Cloudstack such as listApiKeys return the full list and do not support pagination.

Perform a paging request. Elements are fetched by chunks of 500.
 If both `page` and `pagesize` are provided then we return a single page only,
 Otherwise fetch all results page by page.

This functionality is dependent on the api call supporting pagination,
`listZones` and `listSecurityGroups` are examples of this.

Custom Exoscale commands that are not present in Cloudstack such as
`listApiKeys` return the full list and do not support pagination.
sourceraw docstring

opts->http-request-optsclj

(opts->http-request-opts {:as _opts :keys [request-timeout]})

Converts legacy request opts to jdk11 client opts

Converts legacy request opts to jdk11 client opts
sourceraw docstring

parse-bodyclj

(parse-body response)
source

raw-request!!clj

(raw-request!!
  {:keys [endpoint http-opts client method] :or {method :post} :as _config}
  payload)

Send an HTTP request

Send an HTTP request
sourceraw docstring

request!!clj

(request!! config opcode params)

Send a request to the API and figure out the best course of action from there.

Specifically:

  • For a list request, fetch and page results
  • For an async job request, wait for the job result
Send a request to the API and figure out the best course of action
from there.

Specifically:

- For a list request, fetch and page results
- For an async job request, wait for the job result
- 
sourceraw docstring

text-request!!clj

(text-request!! config opcode params)
source

validate-job!!clj

(validate-job!! {{:keys [errortext errorcode] :as jobresult} :jobresult
                 :as response}
                config
                opcode
                params)
  • return jobresult if job was successful
  • throw ex-info in case of failure (body is a string to mimic behavior of other query exceptions)
* return jobresult if job was successful
* throw ex-info in case of failure (body is a string to mimic
behavior of other query exceptions)
sourceraw docstring

wait-or-return-job!!clj

(wait-or-return-job!! config remaining)
source

with-decoded-error-bodyclj

(with-decoded-error-body d)

Catches potential deferred error and rethrow with decoded ex-data.body if there is one, otherwise just rethrow

Catches potential deferred error and rethrow with decoded
ex-data.body if there is one, otherwise just rethrow
sourceraw docstring

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

× close