observer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublishPoisonMessage added in v1.0.1

func PublishPoisonMessage(payload Topic, subscriber Subscriber) error

func RetryInternalEvent added in v1.0.1

func RetryInternalEvent()

func SetGlobalPublisher

func SetGlobalPublisher(publisher *Publisher)

Types

type Publisher

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

func GetGlobalPublisher

func GetGlobalPublisher() *Publisher

func NewPublisher

func NewPublisher(debug bool) *Publisher

func (*Publisher) AttachSubscriber

func (p *Publisher) AttachSubscriber(topic string, sub Subscriber)

func (*Publisher) Publish

func (p *Publisher) Publish(topic Topic)

type Subscriber

type Subscriber interface {
	Subscribe(topic Topic)
}

type Topic

type Topic struct {
	RequestID       string
	Subject         string
	Payload         interface{}
	RetrialAttempts int
}

func EmptyTopic

func EmptyTopic() Topic

Jump to

Keyboard shortcuts

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