Documentation ¶
Overview ¶
Package bgworker provides interface for bgworker plugins. A bgworker plugin has to implement the following function. NewBgWorker(config map[string]interface{}) (BgWorker, error)
Background workers run under the marketstore server by implementing the interface, started at the very beginning of the server lifecycle before the query interface is started, but internal state shuold be fledged. The server does not handle panics that happen within the plugin. A plugin can recover from panics, but be careful not to screw the server state if touching internal API. It is often better to just let it go.
Configuration is as follows.
bgworkers: - module: xxxWorker.so name: datafeed config: <according to the plulgin>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BgWorker ¶
type BgWorker interface {
Run()
}
BgWorker implements Run(). It will be running under a separate goroutine.
type SymbolLoader ¶
SymbolLoader is an interface to retrieve symbol object from plugin.