lifecycle

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lifecycle coordinates retained teardown results and independently cancellable waiters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Close

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

Close coordinates one committed teardown and lets callers wait with their own contexts without transferring ownership of the teardown.

func (*Close) Begin

func (c *Close) Begin() bool

Begin reports whether the caller owns teardown.

func (*Close) Finish

func (c *Close) Finish(err error)

Finish publishes the retained teardown result.

func (*Close) Started

func (c *Close) Started() bool

Started reports whether teardown has been committed.

func (*Close) Wait

func (c *Close) Wait(ctx context.Context) error

Wait returns the teardown result or the caller's context error.

Jump to

Keyboard shortcuts

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