Help us shape the future of Go! Take the 2026 Go Developer Survey

lifecycle

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecFunc

type ExecFunc = func(context.Context) error

func WrapNoCtx

func WrapNoCtx(fn func() error) ExecFunc

func WrapNoCtxErr

func WrapNoCtxErr(fn func()) ExecFunc

func WrapNoError

func WrapNoError(fn func(context.Context)) ExecFunc

type Executor

type Executor struct {
	Exec ExecFunc
}

type Getter

type Getter interface {
	GetAfterStops() []Executor
	GetBeforeStops() []Executor
	GetAfterStarts() []Executor
	GetBeforeStarts() []Executor
}

type Handler

type Handler func(lc Lifecycle)

type Lifecycle

type Lifecycle interface {
	AfterStop(f ExecFunc)
	BeforeStop(f ExecFunc)
	AfterStart(f ExecFunc)
	BeforeStart(f ExecFunc)
}

Jump to

Keyboard shortcuts

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