close

package
v0.77.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: AGPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

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

func NewCloser

func NewCloser() *Closer

func (*Closer) Add

func (c *Closer) Add(closeFn func())

Add adds a function to call during call to CloseAll.

func (*Closer) CloseAll

func (c *Closer) CloseAll()

CloseAll calls all close functions in reverse order. Higher level-components should be closed first, but are usually instantiated last (and, thus, added later to the closer), hence the reverse order.

Jump to

Keyboard shortcuts

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