powergate: github.com/textileio/powergate/signaler Index | Files

package signaler

import "github.com/textileio/powergate/signaler"


Package Files


type Signaler Uses

type Signaler struct {
    // contains filtered or unexported fields

Signaler allows subscribing to a singnaling hub.

func New Uses

func New() *Signaler

New returns a new Signaler.

func (*Signaler) Close Uses

func (s *Signaler) Close()

Close closes the Signaler. Any channel that wasn't explicitly unregistered, is closed.

func (*Signaler) Listen Uses

func (s *Signaler) Listen() <-chan struct{}

Listen returns a new channel signaler.

func (*Signaler) Signal Uses

func (s *Signaler) Signal()

Signal triggers a new notification to all listeners.

func (*Signaler) Unregister Uses

func (s *Signaler) Unregister(c chan struct{})

Unregister unregisters a channel signaler from the hub.

Package signaler imports 2 packages (graph) and is imported by 10 packages. Updated 2020-06-08. Refresh now. Tools for package owners.