notifier

package
v0.0.0-...-720f34a Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package notifier implements a Notifier type, which can be used to send broadcast notification to many listeners.

Unlike sync.Cond, here is no delivery guarantee, e.g. if a listener is too busy to pick up the notification, it will be dropped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	C <-chan bool
	// contains filtered or unexported fields
}

func (*Listener) Close

func (l *Listener) Close()

type Notifier

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

func (*Notifier) Len

func (n *Notifier) Len() int

func (*Notifier) NewListener

func (n *Notifier) NewListener() *Listener

func (*Notifier) Notify

func (n *Notifier) Notify()

Jump to

Keyboard shortcuts

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