first
This commit is contained in:
commit
89ef17f96d
0
cache/cache.go
vendored
Normal file
0
cache/cache.go
vendored
Normal file
53
cmd/main.go
Normal file
53
cmd/main.go
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/cache"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/collector"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/config"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/feature_processor"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/scheduler"
|
||||||
|
"gitea.zjmud.xyz/phyer/blingo/storage"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// 1. 加载配置
|
||||||
|
cfg, err := config.LoadConfig("config/config.yaml")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error loading config: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("Configuration loaded successfully.")
|
||||||
|
|
||||||
|
// 2. 数据采集
|
||||||
|
data, err := collector.CollectData(cfg)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error collecting data: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("Data collected successfully.")
|
||||||
|
|
||||||
|
// 3. 特征处理
|
||||||
|
processedData, err := feature_processor.ProcessFeatures(data)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error processing features: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("Features processed successfully.")
|
||||||
|
|
||||||
|
// 4. 缓存处理
|
||||||
|
err = cache.CacheData(processedData)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error caching data: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("Data cached successfully.")
|
||||||
|
|
||||||
|
// 5. 存储数据
|
||||||
|
err = storage.StoreData(processedData)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error storing data: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("Data stored successfully.")
|
||||||
|
|
||||||
|
// 6. 调度执行
|
||||||
|
scheduler.ScheduleTasks(cfg)
|
||||||
|
fmt.Println("Tasks scheduled successfully.")
|
||||||
|
}
|
0
collector/collector.go
Normal file
0
collector/collector.go
Normal file
0
config/config.yaml
Normal file
0
config/config.yaml
Normal file
0
docs/README.md
Normal file
0
docs/README.md
Normal file
0
feature_processor/feature_processor.go
Normal file
0
feature_processor/feature_processor.go
Normal file
33
go.mod_back
Normal file
33
go.mod_back
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
module gitea.zjmud.xyz/phyer/blingo
|
||||||
|
|
||||||
|
go 1.24.0
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/elastic/go-elasticsearch/v8 v8.9.0
|
||||||
|
github.com/go-redis/redis/v8 v8.11.5
|
||||||
|
github.com/gorilla/websocket v1.5.0
|
||||||
|
github.com/sirupsen/logrus v1.9.0
|
||||||
|
github.com/spf13/viper v1.10.0
|
||||||
|
github.com/urfave/cli/v2 v2.25.7
|
||||||
|
github.com/bits-and-blooms/bitset v1.13.0 // indirect
|
||||||
|
github.com/ccxt/ccxt/go/v4 v4.4.62 // indirect
|
||||||
|
github.com/consensys/bavard v0.1.13 // indirect
|
||||||
|
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||||
|
github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect
|
||||||
|
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
|
||||||
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
|
||||||
|
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
|
||||||
|
github.com/ethereum/go-ethereum v1.14.13 // indirect
|
||||||
|
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
|
||||||
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
|
github.com/holiman/uint256 v1.3.1 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.4.3 // indirect
|
||||||
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
|
github.com/supranational/blst v0.3.13 // indirect
|
||||||
|
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
||||||
|
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||||
|
golang.org/x/crypto v0.31.0 // indirect
|
||||||
|
golang.org/x/sync v0.7.0 // indirect
|
||||||
|
golang.org/x/sys v0.28.0 // indirect
|
||||||
|
rsc.io/tmplfunc v0.0.3 // indirect
|
||||||
|
)
|
0
scheduler/scheduler.go
Normal file
0
scheduler/scheduler.go
Normal file
0
storage/storage.go
Normal file
0
storage/storage.go
Normal file
Loading…
x
Reference in New Issue
Block a user