Skip to content

Glossary: Software Design Patterns in Go

Observer

Also written: observer pattern

A pattern where the code that something happens in (the subject) keeps listeners and calls each one when the event occurs. New reactions, such as Alex's packing slip, are added without touching the emitting code.

Where the book teaches it

Related terms

ListenerSubjectEvent busPublish/subscribe