Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RendererRunner ¶
type RendererRunner struct { queue.BaseRunner // contains filtered or unexported fields }
RendererRunner is a runner is registered with the queue agent that knows how to render markdown text to HTML.
func NewRendererRunner ¶
func NewRendererRunner(server rsstorage.StorageServer) *RendererRunner
func (*RendererRunner) Run ¶
func (r *RendererRunner) Run(work queue.RecursableWork) error
type RendererWork ¶
RendererWork is the work that gets serialized and "Pushed" into the queue when we need to render markdown to HTML.
func NewRendererWork ¶
func NewRendererWork(markdown string) (RendererWork, error)
func (RendererWork) Address ¶
func (w RendererWork) Address() string
Address is used to determine the file name for storing the rendered HTML. Since the address includes the SHA of the provided markdown, we can guarantee a unique address. Additionally, if rendering is requested for the same markdown again, the address will match an existing item in the cache.
func (RendererWork) Dir ¶
func (w RendererWork) Dir() string
Dir specifies a subdirectory in which to store an item on the storage server. If blank, no subdirectory will be used.
func (RendererWork) Type ¶
func (RendererWork) Type() uint64