Documentation
¶
Overview ¶
Package thumbwire assembles the tile worker for the HTTP composition root (#1787): the headless renderer the worker draws in, the client a document's public references are fetched with, and the stores and buckets it claims from and records to.
It takes the assembled mux as well as the platform, because the page a tile is drawn from loads the viewer's chunks and a document's references from the platform's own routes, answered in-process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build returns the tile worker, or nil when there is nothing to draw: no platform, tiles turned off, no tile page in this build, or no asset store that can hand out work. A nil worker's Start and Stop do nothing.
func NewRenderer ¶ added in v1.139.0
NewRenderer is the headless renderer the platform draws tiles and prints PDFs in (#1983), at the renderer address the thumbnails section names.
A document may name an image or a font on a public host. The platform fetches it through the same guard the util connection uses, so a document cannot make the platform reach an address inside the deployment. Redirects go back to the page, which asks again and is checked again.
Types ¶
type TileReader ¶ added in v1.137.0
type TileReader interface {
Tile(ctx context.Context, scriptID, variant string) (data []byte, current bool, err error)
}
TileReader reads one script's stored tile.
func ScriptTiles ¶ added in v1.137.0
func ScriptTiles(p *platform.Platform) TileReader
ScriptTiles is the reader a script's tile is served from (#1909): the tile worker's record over the bucket it stores tiles in. Nil (not a nil pointer) where there is no database or no portal storage, which leaves the route unmounted.