thumbwire

package
v1.137.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

func Build(p *platform.Platform, routes http.Handler) *thumbworker.Worker

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL