idledown

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package idledown provides an htadaptor.Middleware that shuts the server down due to inactivity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.0.12

func New(
	parent context.Context,
	shutdownAfter time.Duration,
) (context.Context, htadaptor.Middleware)

New creates an htadaptor.Middleware that resets its internal timer for each http.Request and shuts down an http.Server when the timer runs out. Use it for services that are meant to scale down to zero or few instances.

Types

This section is empty.

Jump to

Keyboard shortcuts

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