event

package
v0.0.0-...-77dcbbd Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package event implements Pub-Sub using channel.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEventNotFound = errors.New("event not found")
)

Functions

This section is empty.

Types

type EventEmitter

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

func New

func New() *EventEmitter

func (*EventEmitter) Close

func (ee *EventEmitter) Close() error

func (*EventEmitter) Emit

func (ee *EventEmitter) Emit(event string, message interface{})

func (*EventEmitter) On

func (ee *EventEmitter) On(event string, out chan interface{})

func (*EventEmitter) Publish

func (ee *EventEmitter) Publish(event string, message interface{})

func (*EventEmitter) Subscribe

func (ee *EventEmitter) Subscribe(event string) chan interface{}

func (*EventEmitter) Unsubscribe

func (ee *EventEmitter) Unsubscribe(event string, deletingOut chan interface{}) error

func (*EventEmitter) UnsubscribeAll

func (ee *EventEmitter) UnsubscribeAll(event string) error

Jump to

Keyboard shortcuts

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