internal

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEventBusClosed error = errors.New("internal: event bus closed")

Functions

This section is empty.

Types

type EventArgs

type EventArgs struct {
	WatchLoss bool
	Message   string
}

type EventBus

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

func (*EventBus) AddWatcher

func (eb *EventBus) AddWatcher(eventName string) (Watcher, error)

func (*EventBus) ChannelNamePrefix

func (eb *EventBus) ChannelNamePrefix() string

func (*EventBus) Close

func (eb *EventBus) Close() error

func (*EventBus) Init

func (eb *EventBus) Init(pubSub *redis.PubSub, options EventBusOptions) *EventBus

func (*EventBus) IsClosed

func (eb *EventBus) IsClosed() bool

func (*EventBus) RemoveWatcher

func (eb *EventBus) RemoveWatcher(eventName string, wrappedWatcher Watcher) error

type EventBusOptions

type EventBusOptions struct {
	ChannelNamePrefix            string
	MaxNumberOfIdleSubscriptions int
	IdleSubscriptionTimeout      time.Duration
	Go                           func(func())
}

type Watcher

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

func (Watcher) Event

func (w Watcher) Event() <-chan struct{}

func (Watcher) EventArgs

func (w Watcher) EventArgs() EventArgs

Jump to

Keyboard shortcuts

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