sync

package
v0.0.0-...-9dc6383 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

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

Emitter allows communication between multiple producers and listeners.

func NewEmitter

func NewEmitter() *Emitter

func (*Emitter) Send

func (s *Emitter) Send(msg string)

Send allows goroutines to send messages over the emitter. Non-blocking sends are ensured.

func (*Emitter) Subscribe

func (e *Emitter) Subscribe() chan string

func (*Emitter) Unsubscribe

func (e *Emitter) Unsubscribe(listener chan string)

Jump to

Keyboard shortcuts

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