lifecycle

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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