oplog

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

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

Broadcaster - defines a pubsub mechanism for distributing events to listeners

func NewBroadcaster

func NewBroadcaster() Broadcaster

NewBroadcaster - create a new broadcaster object.

func (Broadcaster) Listen

func (b Broadcaster) Listen() Receiver

Listen - start listening to the broadcasts.

func (Broadcaster) Write

func (b Broadcaster) Write(v interface{})

Write - broadcast a value to all listeners.

type Receiver

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

Receiver - a listener for events

func (*Receiver) Read

func (r *Receiver) Read() interface{}

Read - read a value that has been broadcast, waiting until one is available if necessary.

Jump to

Keyboard shortcuts

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