mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-25 04:08:59 -07:00
Started moving to a chainDB for tracking history.
This commit is contained in:
parent
749bd6557e
commit
458214aaa9
6 changed files with 31 additions and 18 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
http "net/http"
|
||||
sync "sync"
|
||||
|
||||
gcdb "git.dragonheim.net/dragonheim/gagent/internal/chaindb"
|
||||
gstructs "git.dragonheim.net/dragonheim/gagent/internal/gstructs"
|
||||
|
||||
prometheus "github.com/prometheus/client_golang/prometheus"
|
||||
|
@ -18,6 +19,8 @@ var (
|
|||
opsProcessed = promauto.NewCounter(prometheus.CounterOpts{
|
||||
Name: "client_requests_recieved",
|
||||
})
|
||||
|
||||
db gcdb.GagentDb
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -38,6 +41,8 @@ func Main(wg *sync.WaitGroup, config gstructs.GagentConfig) {
|
|||
workerSock, _ := zmq.NewSocket(zmq.DEALER)
|
||||
defer workerSock.Close()
|
||||
|
||||
db.Init()
|
||||
|
||||
workerListener := fmt.Sprintf("tcp://%s:%d", config.ListenAddr, config.WorkerPort)
|
||||
_ = workerSock.Bind(workerListener)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue