event

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(client *redis.RdClient)

func Events

func Events() <-chan Event

func Publish

func Publish(name string, ev *Event) error

func Subscribe

func Subscribe(name string) error

Types

type Bus

type Bus struct {
	*redis.RdClient
	// contains filtered or unexported fields
}

type Event

type Event struct {
	ID        string
	Timestamp int64
	Action    string
	Content   interface{}
}

func NewEvent

func NewEvent(action string, content interface{}) *Event

Jump to

Keyboard shortcuts

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