HeartCheck.CachingPlug.Server (heartcheck v0.4.3) View Source
GenServer that serves health check results from it's internal state
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Fetches the execution result from the cache
Callback implementation for GenServer.init/1
.
Returns the last time the server has run or nil
if that didn't happen
Starts a server that caches the given heartcheck
module result for the
given ttl
(in milliseconds). It registers itself using the provided name
.
If name is not given, a name based on the heartcheck
will be used.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
fetch(GenServer.server()) :: term()
Fetches the execution result from the cache
Callback implementation for GenServer.init/1
.
Specs
last_run(GenServer.server()) :: DateTime.t() | nil
Returns the last time the server has run or nil
if that didn't happen
Specs
start_link(atom(), non_neg_integer(), GenServer.name()) :: GenServer.on_start()
Starts a server that caches the given heartcheck
module result for the
given ttl
(in milliseconds). It registers itself using the provided name
.
If name is not given, a name based on the heartcheck
will be used.