package closer

import "github.com/pion/dtls/v3/internal/closer"

Package closer provides signaling channel for shutdown

Index

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

Source Files

closer.go

Version
v3.0.4 (latest)
Published
Nov 4, 2024
Platform
linux/amd64
Imports
1 packages
Last checked
1 week ago

Tools for package owners.