exhtml v0.4.0-beta.3 Exhtml.Host
Exhtml.Host represents the content server.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Deletes the content from a host
Gets html content from a host
Gets html content from a host with cache time
Sets html content to a host with a slug
Sets the content fetcher. A fetcher is used to fetch content from the data source, such as a remote server
Starts a host
Fetchs and sets the content from the storage to a host’s table
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Deletes the content from a host.
server
- the PID or name of the processslug
- the key of the content
Gets html content from a host.
server
- the PID or name of the processslug
- the key of the content
get_content_since(server(), slug(), DateTime.t()) :: any()
Gets html content from a host with cache time.
server
- the PID or name of the processslug
- the key of the contenttime
- the modified time to check.
Sets html content to a host with a slug.
server
- the PID or name of the processslug
- the key of the contentvalue
- the content to save
Returns :ok
.
Sets the content fetcher. A fetcher is used to fetch content from the data source, such as a remote server.
server
- the PID or name of the processf
- function or module to fetch content
Starts a host.
opts
- options for starting the processname
- the process namecontent_fetcher
- the content fetcher forExhtml.Storage
data_dir
- the database storage dir forExhtml.Table
data_nodes
- the database nodes forExhtml.Table
Fetchs and sets the content from the storage to a host’s table.
server
- the PID or name of the processslug
- the key of the content
Returns content fetched.