broker

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	List   ObjectType = "list"
	Single ObjectType = "single"

	Add    EventType = "ADDED"
	Update EventType = "MODIFIED"
	Delete EventType = "DELETED"
	Error  EventType = "ERROR"
)

Functions

This section is empty.

Types

type EventType

type EventType string

type Handler

type Handler interface {
	PublishInterface
	SubscribeInterface
	Info() string
}

type Message

type Message struct {
	ObjectType ObjectType
	EventType  EventType
	Object     interface{}
}

type ObjectType

type ObjectType string

type PublishInterface

type PublishInterface interface {
	Publish(string, *Message) error
	PublishWithChannel(string, chan *Message) error
}

type SubscribeInterface

type SubscribeInterface interface {
	Subscribe(string, string, []byte) error
	SubscribeWithChannel(string, string, chan *Message) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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