lifecycle

package
v0.0.0-...-714bc2e Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(ctx context.Context) option

Context .

Types

type Hook

type Hook struct {
	Name    string
	OnStart func(ctx context.Context) error
	OnStop  func(ctx context.Context) error
}

Hook .

type Lifecycle

type Lifecycle struct {
	// contains filtered or unexported fields
}

Lifecycle .

func (*Lifecycle) Append

func (lf *Lifecycle) Append(hooks ...*Hook)

Append .

func (*Lifecycle) Start

func (lf *Lifecycle) Start(opts ...option) error

Start .

func (*Lifecycle) Stop

func (lf *Lifecycle) Stop(opts ...option) error

Stop .

Jump to

Keyboard shortcuts

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