notifications

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0, MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface{}

Event is a publishable event

type Publisher

type Publisher interface {
	Close(Topic)
	Publish(Topic, Event)
	Shutdown()
	Startup()
	Subscribable
}

Publisher is an publisher of events that can be subscribed to

func NewPublisher

func NewPublisher() Publisher

NewPublisher returns a new message event publisher

type Subscribable

type Subscribable interface {
	Subscribe(topic Topic, sub Subscriber) bool
	Unsubscribe(sub Subscriber) bool
}

Subscribable is a stream that can be subscribed to

type Subscriber

type Subscriber interface {
	OnNext(Topic, Event)
	OnClose(Topic)
}

Subscriber is a subscriber that can receive events

type Topic

type Topic interface{}

Topic is a topic that events appear on

type TopicData added in v0.5.2

type TopicData interface{}

TopicData is data added to every message broadcast on a topic

Jump to

Keyboard shortcuts

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