Documentation ¶ Index ¶ type Event type IObserver type ISubject type Observer func (o *Observer) Update(event *Event) type Subject func (s *Subject) Dismiss(observers ...IObserver) func (s *Subject) Notify(event *Event) func (s *Subject) Register(observers ...IObserver) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Event ¶ type Event struct { Data string // contains filtered or unexported fields } type IObserver ¶ type IObserver interface { Update(*Event) } type ISubject ¶ type ISubject interface { Register(...IObserver) Dismiss(...IObserver) Notify(*Event) } type Observer ¶ type Observer struct { Id int } func (*Observer) Update ¶ func (o *Observer) Update(event *Event) type Subject ¶ type Subject struct { // contains filtered or unexported fields } func (*Subject) Dismiss ¶ func (s *Subject) Dismiss(observers ...IObserver) func (*Subject) Notify ¶ func (s *Subject) Notify(event *Event) func (*Subject) Register ¶ func (s *Subject) Register(observers ...IObserver) Source Files ¶ View all Source files event.goobserver.gosubject.go Click to show internal directories. Click to hide internal directories.