eventbus

package
v3.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PriorityLow int = iota
	PriorityHigh
	PriorityCritical
)

The priority levels for event bus messages.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus struct {
	// 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, p int, 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