Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher interface {
// Notify emits an event
Notify(e SubjectEvent)
}
Publisher introduces "write" capabilities on the subject
type Subject ¶
type Subject interface {
Subscriber
Publisher
}
Subject represent the interface for a subject
func NewSubject ¶
func NewSubject() Subject
NewSubject creates a new instance of the internal struct
type SubjectChannel ¶
type SubjectChannel chan SubjectEvent
SubjectChannel is the channel that will pass the events
type Subscriber ¶
type Subscriber interface {
// Register adds a new observer
Register(id string) (SubjectChannel, error)
// Deregister removes an observer
Deregister(id string)
}
Subscriber represents the base functionality of a subject (used by observers)
Click to show internal directories.
Click to hide internal directories.