Back to godoc.org

Package warmup

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Overview

Package warmup allows to register hooks executed during the server warmup.

All registered hooks should be optional. Warmup can be skipped.

Index

func InstallHandlers

func InstallHandlers(r *router.Router, base router.MiddlewareChain)

InstallHandlers installs HTTP handlers for warmup /_ah/* routes.

func Register

func Register(name string, cb Callback)

Register adds a callback called during warmup.

func Warmup

func Warmup(c context.Context) error

Warmup executes all registered warmup callbacks, sequentially.

Doesn't abort on individual callback errors, just collects and returns them all.

type Callback

type Callback func(c context.Context) error

Callback will be called during warmup.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier