maintenance

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package maintenance provides utilities for maintenance mode handling

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.21.0

type Config interface {
	MaintenanceMode() bool
}

Config is an interface that determines if the implementer can supply maintenance mode settings.

type Responder

type Responder struct {
	// contains filtered or unexported fields
}

Responder is a handle to a configured maintenance mode responder.

func New

func New(c Config) *Responder

New creates a new maintenance mode responder.

func (*Responder) Handle

func (r *Responder) Handle(next http.Handler) http.Handler

Handle will either return the maintenance mode responder (if enabled) or pass through to the next handler.

Jump to

Keyboard shortcuts

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