Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher interface {
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 ¶
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(id string) (SubjectChannel, error) Deregister(id string) }
Subscriber represents the base functionality of a subject (used by observers)
Click to show internal directories.
Click to hide internal directories.