closer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseFunc

type CloseFunc func(ctx context.Context) error

type Closer

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

func New

func New(opts ...Option) *Closer

func (*Closer) Add

func (c *Closer) Add(name string, fn CloseFunc)

func (*Closer) AddWrap added in v0.0.3

func (c *Closer) AddWrap(name string, fn func())

func (*Closer) Close

func (c *Closer) Close() error

type Option added in v0.0.4

type Option func(*Closer)

func WithLogger added in v0.0.4

func WithLogger(logger *slog.Logger) Option

func WithTimeout added in v0.0.4

func WithTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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