closer

package
v0.0.0-...-24e5678 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.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 Closer

type Closer interface {
	Close()
}

Closer is Closer inferface

type Manager

type Manager struct {
	Names   []string
	Closers []Closer
	// contains filtered or unexported fields
}

Manager handles closers

func NewManager

func NewManager() *Manager

NewManager returns a Manager

func (*Manager) Add

func (cm *Manager) Add(Name string, c Closer)

Add adds a closer with a name

func (*Manager) CloseAll

func (cm *Manager) CloseAll()

CloseAll closers all closers

func (*Manager) IsClosed

func (cm *Manager) IsClosed() bool

IsClosed returns it is closed or not

func (*Manager) RemoveAll

func (cm *Manager) RemoveAll()

RemoveAll removes all closers

func (*Manager) Wait

func (cm *Manager) Wait()

Wait waits close all

Jump to

Keyboard shortcuts

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