Observer defines a standard interface for instances that wish to list for the occurrence of a specific event.
| 18 | // Observer defines a standard interface for instances that wish to list for |
| 19 | // the occurrence of a specific event. |
| 20 | Observer interface { |
| 21 | // OnNotify allows an event to be "published" to interface implementations. |
| 22 | // In the "real world", error handling would likely be implemented. |
| 23 | OnNotify(Event) |
| 24 | } |
| 25 | |
| 26 | // Notifier is the instance being observed. Publisher is perhaps another decent |
| 27 | // name, but naming things is hard. |
no outgoing calls
no test coverage detected