Folks,
Is there a way to do this better?
https://gist.github.com/37dada7af636e2db000d
I'm concerned about field access in particular, e.g. the Symbol()
method.
The idea is that the instrument's goroutine sits there and updates
itself with prices, etc. while taking requests to fetch the same.
The reason for SetHook is because i may have super-instruments that
may want to receive other kinds of market data and process that too.
There's no inheritance in go thus the hook.
For example, an Options instrument will have additional fields to be
updated while embedding the instrument within itself. So it will let
embedded instrument update itself and then act on the event that
instrument skipped to update its own fields.
Thanks, Joel