Liking cljdoc? Tell your friends :D

s4.sqs

Simulate SQS, for handling S3 notifications.

Simulate SQS, for handling S3 notifications.
raw docstring

default-queue-attributesclj

source

make-handlerclj

(make-handler system)
source

make-reloadable-handlerclj

(make-reloadable-handler system)
source

make-server!clj

(make-server! {:keys [bind-address port konserve cost-tracker reloadable?
                      auth-store hostname request-id-prefix clock]
               :or {hostname "localhost"
                    clock (Clock/systemUTC)
                    bind-address "127.0.0.1"
                    port 0}})

Launch a HTTP server that serves the S3 HTTP API.

Arguments include:

  • bind-address A string, or an InetAddress; the address to bind to. Defaults to "127.0.0.1".
  • port A port number to bind to. Defaults to 0, which will bind to a random available port.
  • konserve An instance satisfying konserve.protocols/PEDNAsyncKeyValueStore. Will default to a in-memory store if not supplied.
  • cost-tracker A s4.$$$$/ICostTracker instance. Defaults to one that simulates default usage in us-west-2.
  • reloadable? If truthy, creates the HTTP handler such that if you reload namespaces s4.core or s4.auth, the changes are reflected in the running server. Default false.
  • auth-store An instance satisfying s4.auth.protocols/AuthStore. Defaults to a s4.auth/AtomAuthStore instance.
  • hostname The hostname to assign the server, default "localhost".
  • request-id-prefix A string to prepend to request IDs. Default nil.
  • clock A java.time.Clock to use for generating timestamps. Default is (java.time.Clock/systemUTC)

Return value is an atom, containing a map of keys:

  • server The aleph HTTP server.
  • bind-address The InetSocketAddress that was bound, including the port that was selected, if a random port was used.
  • konserve The konserve store instance.
  • cost-tracker The cost tracker instance.
  • auth-store The auth store instance. If you let this create the default store, you likely want to assoc your fake access keys into the atom contained by the AtomAuthStore.
Launch a HTTP server that serves the S3 HTTP API.

Arguments include:

* `bind-address` A string, or an InetAddress; the address to bind
  to. Defaults to "127.0.0.1".
* `port` A port number to bind to. Defaults to 0, which will bind
  to a random available port.
* `konserve` An instance satisfying konserve.protocols/PEDNAsyncKeyValueStore.
  Will default to a in-memory store if not supplied.
* `cost-tracker` A `s4.$$$$/ICostTracker` instance. Defaults to
  one that simulates default usage in us-west-2.
* `reloadable?` If truthy, creates the HTTP handler such that if
  you reload namespaces s4.core or s4.auth, the changes are reflected
  in the running server. Default false.
* `auth-store` An instance satisfying s4.auth.protocols/AuthStore.
  Defaults to a `s4.auth/AtomAuthStore` instance.
* `hostname` The hostname to assign the server, default "localhost".
* `request-id-prefix` A string to prepend to request IDs. Default nil.
* `clock` A `java.time.Clock` to use for generating timestamps. Default
  is `(java.time.Clock/systemUTC)`

Return value is an atom, containing a map of keys:

* `server` The aleph HTTP server.
* `bind-address` The InetSocketAddress that was bound, including
  the port that was selected, if a random port was used.
* `konserve` The konserve store instance.
* `cost-tracker` The cost tracker instance.
* `auth-store` The auth store instance. If you let this create the
  default store, you likely want to assoc your fake access keys into
  the atom contained by the AtomAuthStore.
sourceraw docstring

message-body?clj

(message-body? s)
source

sqs-handlerclj

(sqs-handler {:keys [request-id-prefix request-counter] :as system})
source

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

× close