(backend-snapshot dura)
Convenience fn for acquiring a snapshot of the persistent storage of a duratom/duragent manually.
Convenience fn for acquiring a snapshot of the persistent storage of a duratom/duragent manually.
(destroy dura)
Convenience fn for cleaning up the persistent storage of a duratom/duragent manually.
Convenience fn for cleaning up the persistent storage of a duratom/duragent manually.
duragent is to agent, what duratom is to atom
duragent is to agent, what duratom is to atom
Top level constructor function for the <Duratom> class.
Built-in <backed-by> types are :local-file
, :postgres-db
, :sqlite-db
, :redis-db
& :aws-s3
.
Top level constructor function for the <Duratom> class. Built-in <backed-by> types are `:local-file`, `:postgres-db`, `:sqlite-db`, `:redis-db` & `:aws-s3`.
(file-atom file-path)
(file-atom file-path lock initial-value)
(file-atom file-path lock initial-value rw)
Creates and returns a file-backed atom (on the local filesystem). If the file exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the file <file-path> is updated.
Creates and returns a file-backed atom (on the local filesystem). If the file exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the file <file-path> is updated.
(fileio-atom http-post! key-duratom)
(fileio-atom http-post! key-duratom lock initial-value)
(fileio-atom http-post! key-duratom lock initial-value rw)
(map->Duratom {:keys [make-backend lock init commit-mode read-from
error-handler]})
(postgres-atom db-config table-name)
(postgres-atom db-config table-name row-id)
(postgres-atom db-config table-name row-id lock initial-value)
(postgres-atom db-config table-name row-id lock initial-value rw)
Creates and returns a PostgreSQL-backed atom. If the location denoted by the combination of <db-config> and <table-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the table <table-name> is updated.
Creates and returns a PostgreSQL-backed atom. If the location denoted by the combination of <db-config> and <table-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the table <table-name> is updated.
(redis-atom db-config key-name)
(redis-atom db-config key-name lock initial-value)
(redis-atom db-config key-name lock initial-value rw)
Creates and returns a Redis-backed atom. If the location denoted by the combination of <db-config> and <key-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the key <key-name> is updated.
Creates and returns a Redis-backed atom. If the location denoted by the combination of <db-config> and <key-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the key <key-name> is updated.
(s3-atom creds bucket k)
(s3-atom creds bucket k lock initial-value)
(s3-atom creds bucket k lock initial-value rw)
Creates and returns an S3-backed atom. If the location denoted by the combination of <bucket> and <k> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the bucket key <k> is updated.
Creates and returns an S3-backed atom. If the location denoted by the combination of <bucket> and <k> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the bucket key <k> is updated.
(sqlite-atom db-config table-name)
(sqlite-atom db-config table-name row-id)
(sqlite-atom db-config table-name row-id lock initial-value)
(sqlite-atom db-config table-name row-id lock initial-value rw)
Creates and returns a SQLite-backed atom. If the location denoted by the combination of <db-config> and <table-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the table <table-name> is updated.
Creates and returns a SQLite-backed atom. If the location denoted by the combination of <db-config> and <table-name> exists, it is read and becomes the initial value. Otherwise, the initial value is <init> and the table <table-name> is updated.
(with-atom-ctor ctor & body)
Binds atom-ctor to the provided <ctor> (1-arg) fn,
and executes body. Helpful for creating duratom(s) that
wrap IAtom(s) other than clojure.lang.Atom - what the
default one (clojure.core/atom
) returns.
Binds *atom-ctor* to the provided <ctor> (1-arg) fn, and executes body. Helpful for creating duratom(s) that wrap IAtom(s) other than clojure.lang.Atom - what the default one (`clojure.core/atom`) returns.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close