turbochargerapp

package
v0.0.0-...-af2531a Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Code required to bring turbocharger support to concrete applications

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileHandler

func FileHandler(prefix string, files fs.FS) http.Handler

helper for making a static file handler with Turbocharger advertising enabled

func StaticFilesExportEntrypoint

func StaticFilesExportEntrypoint(files fs.ReadDirFS) *cobra.Command

func WrapWithAdvertisement

func WrapWithAdvertisement(prefix string, backing http.Handler) http.Handler

if deployment specifies TURBOCHARGER_MANIFEST, all requests to a prefix (e.g. /static/...) get "turbocharger" HTTP header added, which instructs any loadbalancer that all /static/... can be henceforth served from a CAS with an approach that has very aggressive caching capabilities

Types

This section is empty.

Jump to

Keyboard shortcuts

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