event

package
v0.0.0-...-ecdf110 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 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 Event

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

An Event that occurrs when certain log command is either enqueued, appended or committed. Events may be fired in the transport layer (i.e. in the eventTransport wrappers) or in the state machine layer (i.e. in the eventFSM wrapper).

func New

func New() *Event

New creates a new event.

func (*Event) Ack

func (e *Event) Ack()

Ack acknowledges that the event has been handled.

func (*Event) Block

func (e *Event) Block()

Block until the watcher of the event has acknowledged that the event has been handled.

func (*Event) Fire

func (e *Event) Fire()

Fire the event. A watcher on the event will be awaken.

func (*Event) Watch

func (e *Event) Watch() <-chan struct{}

Watch the event. Return a channel that gets closed when the event gets fired.

Jump to

Keyboard shortcuts

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