broadcast

package
v0.0.0-...-1ad5891 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 1 Imported by: 0

README

broadcast

Documentation

Overview

Package broadcast

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcast

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

Broadcast allows to send a msg to all listeners

func NewBroadcast

func NewBroadcast() *Broadcast

NewBroadcast creates a new broadcast

func (*Broadcast) Receive

func (b *Broadcast) Receive() <-chan any

Receive a channel on which the next (close) signal will be sent

func (*Broadcast) Send

func (b *Broadcast) Send(msg any)

Send a msg to all listeners

Directories

Path Synopsis
example
hello command

Jump to

Keyboard shortcuts

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