Gemini.Site.File (Gemini v0.2.0)
This module returns file contents as a gemini response.
Link to this section Summary
Link to this section Types
Link to this type
cache_spec()
Specs
cache_spec() :: :disabled | :infinity | pos_integer()
Link to this section Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
make_response(status, meta, body, attrs)
Link to this function
start_link(list)
Start site.
name
name of the server.path
Path prefix.
args
is a list with two arguments:
- a file path
- meta type of the file contents
- a cache value
A cache value of :disabled
disables the cache and the file will be loaded from disk on every access.
A value of :infinity
permanently caches the value in memory.
A positive number of minutes clears the value from the cache if nobody accessed it in a fixed amount of minutes.