Documentation ¶
Overview ¶
Package clifecycle provides a Copper app's lifecycle management. It allows hooks to be registered that are run during various checkpoints in the app's lifecycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
Lifecycle represents the lifecycle of an app. Most importantly, it allows various parts of the app to register stop funcs that are run before the app exits. Packages such as chttp use Lifecycle to gracefully stop the HTTP server before the app exits.
func New ¶
func New() *Lifecycle
New instantiates and returns a new Lifecycle that can be used with New to create a Copper app.
Click to show internal directories.
Click to hide internal directories.