closer

package
v2.0.0-...-07800b7 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package closer provides signaling channel for shutdown

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
}

Closer allows for each signaling a channel for shutdown

func NewCloser

func NewCloser() *Closer

NewCloser creates a new instance of Closer

func NewCloserWithParent

func NewCloserWithParent(ctx context.Context) *Closer

NewCloserWithParent creates a new instance of Closer with a parent context

func (*Closer) Close

func (c *Closer) Close()

Close sends a signal to trigger the ctx done channel

func (*Closer) Done

func (c *Closer) Done() <-chan struct{}

Done returns a channel signaling when it is done

func (*Closer) Err

func (c *Closer) Err() error

Err returns an error of the context

Jump to

Keyboard shortcuts

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