Documentation
¶
Overview ¶
Package lifecycle owns local stop admission and synchronous cleanup joining.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lifetime ¶
type Lifetime struct {
// contains filtered or unexported fields
}
Lifetime separates stop signaling from cleanup. Its zero value is ready to use. Stop callbacks must not acquire locks held during I/O or wait for owned workers.
func (*Lifetime) Close ¶
func (l *Lifetime) Close(cancel, cleanup func())
Close stops admission and runs cleanup once. Every caller waits for that same cleanup to finish, including callers arriving after shutdown has started.
Click to show internal directories.
Click to hide internal directories.