An open API service indexing awesome lists of open source software.

https://github.com/felipeaz/observer-pattern

Implementation of the Observer Pattern in Golang
https://github.com/felipeaz/observer-pattern

design-patterns golang observer-pattern

Last synced: 3 months ago
JSON representation

Implementation of the Observer Pattern in Golang

Awesome Lists containing this project

README

        

# observer-pattern
Implementation of the Observer Pattern in Golang

Observer is a behavioral design pattern that lets you define a subscription mechanism to notify multiple objects about
any events that happen to the object they’re observing.

This example simulates a busy traffic where cars keep looking at the traffic light. The traffic light sends signal
to every car that is listening to it, when it is green, all car moves. When it's red, the cars have to stop and listen
to the traffic light.