pubsub

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandler

func AddHandler(evt string, cb func(*Event), t interface{})

AddEventHandler adds a event handler For the specified event, should only be done during startup

func PollEvents

func PollEvents()

func Publish

func Publish(evt string, target int64, data interface{}) error

PublishEvent publishes the specified event

Types

type Event

type Event struct {
	TargetGuild    string // The guild this event was meant for, or * for all
	TargetGuildInt int64
	EventName      string
	Data           interface{}
}

Jump to

Keyboard shortcuts

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