lifecycle

package
v0.0.0-...-e964040 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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(ctx context.Context) error

Start .

func (*Lifecycle) Stop

func (lf *Lifecycle) Stop(ctx context.Context) error

Stop .

Jump to

Keyboard shortcuts

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