notify

package
v3.0.0-...-eac99ac Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier is a thread safe struct that can be used to send notification about some event to multiple consumers.

func NewNotifier

func NewNotifier() *Notifier

NewNotifier returns new notifier

func (*Notifier) Notify

func (n *Notifier) Notify()

Notify closes the channel passed to consumers and creates new channel to used for next notification.

func (*Notifier) Receive

func (n *Notifier) Receive() <-chan struct{}

Receive returns channel that can be used to wait for notification. Consumers will be informed by closing the channel.

Jump to

Keyboard shortcuts

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