Simulate SQS, for handling S3 notifications.
Simulate SQS, for handling S3 notifications.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close