broadcast

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastChannel

type BroadcastChannel[T any] struct {
	// contains filtered or unexported fields
}

func NewBroadcastChannel

func NewBroadcastChannel[T any]() *BroadcastChannel[T]

func (*BroadcastChannel[T]) Broadcast

func (b *BroadcastChannel[T]) Broadcast(ctx context.Context, content T) error

func (*BroadcastChannel[T]) Register

func (b *BroadcastChannel[T]) Register() (ReceiverID, <-chan T)

func (*BroadcastChannel[T]) Remove

func (b *BroadcastChannel[T]) Remove(id ReceiverID)

type ReceiverID

type ReceiverID string

func NewReceiverID

func NewReceiverID() ReceiverID

Jump to

Keyboard shortcuts

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