Documentation
¶
Overview ¶
Command media-encoder is the OPTIONAL, separately-deployed image-encode worker for the WPMgr Media Optimizer (ADR-043). It runs a River worker on the bounded `media_encode` queue, presigned-GETs source variants from object storage, encodes them with the CGO lilliput encoder, presigned-PUTs the outputs, writes media_variant_results, and dispatches the signed `media_apply` command so the agent applies on disk.
THIS BINARY IS THE ONLY PLACE THAT IMPORTS internal/media/encoder (CGO + lilliput). The main API (cmd/wpmgr) builds CGO_ENABLED=0 on distroless/static and NEVER imports the encoder — it only client.Inserts model.EncodeArgs (a pure-Go River job type). This binary builds CGO_ENABLED=1 on a glibc base (infra/Dockerfile.media-encoder).