signaler

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signaler

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

Signaler allows subscribing to a singnaling hub.

func New

func New() *Signaler

New returns a new Signaler.

func (*Signaler) Close

func (s *Signaler) Close()

Close closes the Signaler. Any channel that wasn't explicitly unregistered, is closed.

func (*Signaler) Listen

func (s *Signaler) Listen() <-chan struct{}

Listen returns a new channel signaler.

func (*Signaler) Signal

func (s *Signaler) Signal()

Signal triggers a new notification to all listeners.

func (*Signaler) Unregister

func (s *Signaler) Unregister(c chan struct{})

Unregister unregisters a channel signaler from the hub.

Jump to

Keyboard shortcuts

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