luci: Index | Files

package warmup

import ""

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

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


Package Files


func InstallHandlers Uses

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

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

func Register Uses

func Register(name string, cb Callback)

Register adds a callback called during warmup.

func Warmup Uses

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 Uses

type Callback func(c context.Context) error

Callback will be called during warmup.

Package warmup imports 6 packages (graph) and is imported by 15 packages. Updated 2020-12-06. Refresh now. Tools for package owners.