event

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(event *Event) error

Types

type Event

type Event struct {
	Topic   string      `json:"topic"`
	Status  string      `json:"status"`
	Data    interface{} `json:"data,omitempty"`
	Context interface{} `json:"context,omitempty"`
}

type Subscriber

type Subscriber interface {
	Event() <-chan *Event
	Unsubscribe()
}

func Subscribe

func Subscribe(topic string) (Subscriber, error)

func SubscribeAll

func SubscribeAll() (Subscriber, error)

Jump to

Keyboard shortcuts

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