watchbus

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus struct {
	// contains filtered or unexported fields
}

EventBus dispatch event

func NewEventBus

func NewEventBus(db drivers.DB) *EventBus

NewEventBus create event bus

func (*EventBus) SetCondition

func (eb *EventBus) SetCondition(cond *operator.Condition)

SetCondition set condition

func (*EventBus) Subscribe

func (eb *EventBus) Subscribe(topic, uuid string, ch chan *drivers.WatchEvent) error

Subscribe subscribe event for certain topic, here topic is database table

func (*EventBus) Unsubscribe

func (eb *EventBus) Unsubscribe(topic, uuid string) error

Unsubscribe unsubscribe topic

Jump to

Keyboard shortcuts

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