exhtml v0.4.0-beta.3 Exhtml.Table
Exhtml.Table provides a place to set and get HTML contents by slug.
Examples:
iex> {:ok, pid} = Exhtml.Table.start_link []
...> Exhtml.Table.set(pid, :foo, :bar)
:ok
...> Exhtml.Table.get(pid, :foo)
:bar
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Gets content of the slug from the store
Gets content of the slug from the store since the time
Join an existing repo
Removes content of the slug from the store
Sets content of the slug into the store
Starts a Exhtml.Table process
Start the repo engine
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Gets content of the slug from the store.
server
- PID or name of the serverslug
- key of the content
get_since(server(), slug(), DateTime.t()) :: any()
Gets content of the slug from the store since the time.
server
- PID or name of the serverslug
- key of the contentsince
- modiefied time
Join an existing repo.
server
- PID or name of the serverremote
- the remote node to connect and joinopts
- options to start the repo, will be passed toExhtml.Repo.start_link/1
Removes content of the slug from the store.
server
- PID or name of the serverslug
- key of the content
Sets content of the slug into the store.
server
- PID or name of the serverslug
- key of the contentcontent
- the content for the slug
Examples:
iex> {:ok, pid} = Exhtml.Table.start_link []
...> Exhtml.Table.set(pid, :foo, :bar)
:ok
iex> Exhtml.Table.get(pid, :foo)
:bar
Starts a Exhtml.Table process.
opts
- options for starting the process:repo
- the pid of started Exhtml.Repo server. If unprovided, all request to Exhtml.Table will return{:error, :repo_not_started}
Returns{:ok, pid}
if succeed,{:error, reason}
otherwise.
Start the repo engine.
Before starting a repo, all actions will not be performed and
{:error, :repo_not_started}
will be returned.
server
- PID or name of the serveropts
- options to start the repo, will be passed toExhtml.Repo.start_link/1