FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 7, '12 at 12:14p
activeSep 7, '12 at 12:14p
posts1
users1
websitegolang.org

1 user in discussion

Joel Reymont: 1 post

People

Translate

site design / logo © 2023 Grokbase