events

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Open() error
	Publish(event string, data interface{}) error
	CheckSubAndPublish(fullEvent string, data interface{}) error
	Subscribe(event string, handler Handler) error
	SubscribeQueue(event string, queue string, handler Handler) error
	Unsubscribe(event string, handler Handler) error
	Marshal(data interface{}) ([]byte, error)
	Unmarshal(data []byte, v interface{}) error
	Close() error
}

type Handler

type Handler func(data []byte)

type Publisher

type Publisher interface {
	Publish(event string, data interface{}) error
	CheckSubAndPublish(fullEvent string, data interface{}) error
	Marshal(data interface{}) ([]byte, error)
}

type Subscriber

type Subscriber interface {
	Subscribe(event string, handler Handler) error
	Unsubscribe(event string, handler Handler) error
	Unmarshal(data []byte, v interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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