AWS implementation of a TransactionStore on S3.
NOTES:
last-segment-info are incorrect. This should be ok in most cases because backing up
a segment is an idempotent operation.last-segment-info is the cheapest way to figure out where to resume, since
it is a single request. Using saved-segment-info lists all objects in the store, and can result
in a lot of requests and network overhead.AWS implementation of a TransactionStore on S3. NOTES: * Since s3 is eventually consistent it is possible that any reported data from methods like `last-segment-info` are incorrect. This should be ok in most cases because backing up a segment is an idempotent operation. * S3 bills by request. ** Choosing a small number of transactions per segment leads to more PUT requests. ** The `last-segment-info` is the cheapest way to figure out where to resume, since it is a single request. Using `saved-segment-info` lists all objects in the store, and can result in a lot of requests and network overhead.
(get-object aws-client bucket-name key)Get an object from s3. Be sure to use this with with-open to ensure the stream is closed when you are done with it.
(with-open [stream (get-object ...)]
...)
Use get-object-as-string for a method that can obtain the string content of an object without such cleanup measures.
Get an object from s3. Be sure to use this with with-open to ensure the stream is closed when you are done with it. ``` (with-open [stream (get-object ...)] ...) ``` Use `get-object-as-string` for a method that can obtain the string content of an object without such cleanup measures.
(new-s3-client)Creates an s3 client. S3 clients are cacheable as long as credentials have not changed. The connection itself is created per request.
DO NOT USE DIRECTLY. Use large object stores (one per bucket) instead, since they can be configured for easy dev override.
Creates an s3 client. S3 clients are cacheable as long as credentials have not changed. The connection itself is created per request. DO NOT USE DIRECTLY. Use large object stores (one per bucket) instead, since they can be configured for easy dev override.
(put-object aws-client bucket-name key bs)Put an object with key in the given bucket. The string-or-file can be
a string or a java.io.File (in the arity-3 version). The arity 4 version requires that the object be some kind
of InputStream. Returns a PutObjectResponse or throws an exception.
Put an object with `key` in the given bucket. The string-or-file can be a string or a java.io.File (in the arity-3 version). The arity 4 version requires that the object be some kind of InputStream. Returns a PutObjectResponse or throws an exception.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |