Documentation ¶
Index ¶
Constants ¶
const TerminalTimestamp = "15:04:05.999"
TerminalTimestamp is used as a format to display only the time.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticSearch ¶
type ElasticSearch struct { ES *elasticsearch.Client IndexName string Cfg *config.ES }
ElasticSearch is for connecting and indexing data to elastic search.
func GetElasticSearch ¶
func GetElasticSearch() *ElasticSearch
GetElasticSearch returns already prepared elastic search instance.
func InitElasticSearch ¶
func InitElasticSearch(cfg *config.ES) (*ElasticSearch, error)
InitElasticSearch initializes elastic search connection with configured values.
func (*ElasticSearch) CommitTickers ¶
func (e *ElasticSearch) CommitTickers(appCtx context.Context, data []Ticker) error
CommitTickers batch inserts input ticker data to elastic search.
func (*ElasticSearch) CommitTrades ¶
func (e *ElasticSearch) CommitTrades(appCtx context.Context, data []Trade) error
CommitTrades batch inserts input trade data to elastic search.
type InfluxDB ¶ added in v1.7.0
type InfluxDB struct { WriteAPI api.WriteAPIBlocking DeleteAPI api.DeleteAPI QuerryAPI api.QueryAPI Cfg *config.InfluxDB }
InfluxDB is for connecting and inserting data to InfluxDB.
func GetInfluxDB ¶ added in v1.7.0
func GetInfluxDB() *InfluxDB
GetInfluxDB returns already prepared influxdb instance.
func InitInfluxDB ¶ added in v1.7.0
InitInfluxDB initializes influxdb connection with configured values.
func (*InfluxDB) CommitTickers ¶ added in v1.7.0
CommitTickers batch inserts input ticker data to influx db.
type MySQL ¶
MySQL is for connecting and inserting data to mysql.
func (*MySQL) CommitTickers ¶
CommitTickers batch inserts input ticker data to database.
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal is for displaying data on terminal.
func GetTerminal ¶
func GetTerminal() *Terminal
GetTerminal returns already prepared terminal instance.
func InitTerminal ¶
InitTerminal initializes terminal display. Output writer is always os.Stdout except in case of testing where file will be set as output terminal.
func (*Terminal) CommitTickers ¶
CommitTickers batch outputs input ticker data to terminal.
func (*Terminal) CommitTrades ¶
CommitTrades batch outputs input trade data to terminal.