View Source PolyPost.Depot (poly_post v0.1.0)
A process to manage the content for a resource (articles, etc.).
Summary
Functions
Returns a specification to start this module under a supervisor.
Removes all the content related to the resouce.
Finds specific content by a key for the resource.
Gets all content for a resource.
Callback implementation for GenServer.handle_continue/2
.
Callback implementation for GenServer.init/1
.
Inserts content for a resource via a key
Starts the Depot process with a given name to represent the resource.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec clear(PolyPost.Resource.name()) :: :ok
Removes all the content related to the resouce.
@spec find(PolyPost.Resource.name(), PolyPost.Resource.key()) :: PolyPost.Resource.content()
Finds specific content by a key for the resource.
@spec get_all(PolyPost.Resource.name()) :: [ {PolyPost.Resource.key(), PolyPost.Resource.content()} ]
Gets all content for a resource.
Callback implementation for GenServer.handle_continue/2
.
Callback implementation for GenServer.init/1
.
@spec insert( PolyPost.Resource.name(), PolyPost.Resource.key(), PolyPost.Resource.content() ) :: :ok
Inserts content for a resource via a key
@spec start_link(PolyPost.Resource.name()) :: GenServer.on_start()
Starts the Depot process with a given name to represent the resource.