eventbus

package
v3.4.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus struct {
	sync.Mutex
	// contains filtered or unexported fields
}

EventBus handles sending and receiving events across Amass.

func NewEventBus

func NewEventBus() *EventBus

NewEventBus initializes and returns an EventBus object.

func (*EventBus) Publish

func (eb *EventBus) Publish(topic string, args ...interface{})

Publish sends req on the channel labeled with name.

func (*EventBus) Stop

func (eb *EventBus) Stop()

Stop prevents any additional requests from being sent.

func (*EventBus) Subscribe

func (eb *EventBus) Subscribe(topic string, fn interface{})

Subscribe registers callback to be executed for all requests on the channel.

func (*EventBus) Unsubscribe

func (eb *EventBus) Unsubscribe(topic string, fn interface{})

Unsubscribe deregisters the callback from the channel.

Jump to

Keyboard shortcuts

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