mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
add doc comment to Notifiability
This commit is contained in:
parent
eb05620f99
commit
0f8e9f6df7
|
@ -18,18 +18,22 @@ type Notifiability struct {
|
||||||
ObjectChannelRouter *ObjectChannelRouter
|
ObjectChannelRouter *ObjectChannelRouter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RouteSession routes symbol name to channel
|
||||||
func (m *Notifiability) RouteSymbol(symbol string) (channel string, ok bool) {
|
func (m *Notifiability) RouteSymbol(symbol string) (channel string, ok bool) {
|
||||||
return m.SymbolChannelRouter.Route(symbol)
|
return m.SymbolChannelRouter.Route(symbol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RouteSession routes session name to channel
|
||||||
func (m *Notifiability) RouteSession(session string) (channel string, ok bool) {
|
func (m *Notifiability) RouteSession(session string) (channel string, ok bool) {
|
||||||
return m.SessionChannelRouter.Route(session)
|
return m.SessionChannelRouter.Route(session)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RouteObject routes object to channel
|
||||||
func (m *Notifiability) RouteObject(obj interface{}) (channel string, ok bool) {
|
func (m *Notifiability) RouteObject(obj interface{}) (channel string, ok bool) {
|
||||||
return m.ObjectChannelRouter.Route(obj)
|
return m.ObjectChannelRouter.Route(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddNotifier adds the notifier that implements the Notifier interface.
|
||||||
func (m *Notifiability) AddNotifier(notifier Notifier) {
|
func (m *Notifiability) AddNotifier(notifier Notifier) {
|
||||||
m.notifiers = append(m.notifiers, notifier)
|
m.notifiers = append(m.notifiers, notifier)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user