signal

package
v4.45.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 5 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityTimer

type ActivityTimer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func CancelAfterInactivity

func CancelAfterInactivity(ctx context.Context, cancel context.CancelFunc, timeout time.Duration) *ActivityTimer

func (*ActivityTimer) SetTimeout

func (t *ActivityTimer) SetTimeout(timeout time.Duration)

func (*ActivityTimer) Update

func (t *ActivityTimer) Update()

type ActivityUpdater

type ActivityUpdater interface {
	Update()
}

type Notifier

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

Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.

func NewNotifier

func NewNotifier() *Notifier

NewNotifier creates a new Notifier.

func (*Notifier) Signal

func (n *Notifier) Signal()

Signal signals a change, usually by producer. This method never blocks.

func (*Notifier) Wait

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

Wait returns a channel for waiting for changes. The returned channel never gets closed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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