bus

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: LGPL-2.1 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublishResource

func PublishResource(key int, status int, id string, data interface{}, context interface{}) error

func PublishResourceDelay added in v1.1.1

func PublishResourceDelay(key int, status int, id string, data interface{}, context interface{}, delayMs int) error

func Subscribe

func Subscribe(key int, subscriber Subscriber)

func Unsubscribe

func Unsubscribe(key int, subscriber Subscriber)

Types

type Resource

type Resource struct {
	Status  int
	Id      string
	Data    interface{}
	Context interface{}
}

type Subscriber

type Subscriber interface {
	Handle(key int, value *Resource)
}

Jump to

Keyboard shortcuts

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