Documentation
¶
Overview ¶
Package image is the media worker's image producer (libvips, CGO): the Image presets' private WebP files, the Zip presets, the public presets' owned generations, editor views, and the kinds' default public images. A Processor runs one media.ProcessJob: it redoes stale or pending outputs, records them in one manifest edit per pass, and keeps public/ in step.
Index ¶
Constants ¶
const Recipe = "webp-1"
Recipe versions the image producer: a change re-renders every image output.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Store media.Store
Manifests *media.Manifests
// Purge relays overwritten or deleted public keys to the host's
// Hooks.PurgePublic (media.HostQueue.Purge); optional.
Purge func(ctx context.Context, keys []string) error
Workers int // uploads decoded at once; default 2
// MaxPixels bounds a decoded source, all frames of an animation
// together (default 100 MP); MaxFrames and MaxAnimationSeconds bound
// animations (defaults 1000 and 60).
MaxPixels int
MaxFrames int
MaxAnimationSeconds float64
TempDir string // zip scratch; default os.TempDir()
}
Config configures a Processor.
type DefaultPublication ¶ added in v0.68.0
DefaultPublication is the complete fallback selection for a deployment. Written contains new immutable objects; Defaults includes existing ones too.
func PublishDefaults ¶ added in v0.62.0
func PublishDefaults(ctx context.Context, store media.Store, reg *media.Registry) (DefaultPublication, error)
PublishDefaults renders to content-addressed, create-only default objects. Deploy its mappings only after success; overlapping deploys never overwrite each other's defaults. The gateway needs no mutable pointer or manifest read.