1 Star 0 Fork 23

ZJ_Lavender/gitbitex-spot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.go 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
greensheng 提交于 2019-09-10 22:34 . Reinitialize
// Copyright 2019 GitBitEx.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"github.com/gitbitex/gitbitex-spot/conf"
"github.com/gitbitex/gitbitex-spot/matching"
"github.com/gitbitex/gitbitex-spot/models"
"github.com/gitbitex/gitbitex-spot/pushing"
"github.com/gitbitex/gitbitex-spot/rest"
"github.com/gitbitex/gitbitex-spot/service"
"github.com/gitbitex/gitbitex-spot/worker"
)
func main() {
gbeConfig, err := conf.GetConfig()
if err != nil {
panic(err)
}
go models.NewBinLogStream().Start()
matching.StartEngine()
pushing.StartServer()
worker.NewFillExecutor().Start()
worker.NewBillExecutor().Start()
products, err := service.GetProducts()
if err != nil {
panic(err)
}
for _, product := range products {
worker.NewTickMaker(product.Id, matching.NewKafkaLogReader(product.Id, gbeConfig.Kafka.Brokers)).Start()
worker.NewFillMaker(matching.NewKafkaLogReader(product.Id, gbeConfig.Kafka.Brokers)).Start()
worker.NewTradeMaker(matching.NewKafkaLogReader(product.Id, gbeConfig.Kafka.Brokers)).Start()
}
rest.StartServer()
select {}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zjlavender/gitbitex-spot.git
git@gitee.com:zjlavender/gitbitex-spot.git
zjlavender
gitbitex-spot
gitbitex-spot
master

搜索帮助