mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-25 04:08:59 -07:00
A bit more refactor to clean up the code.
This commit is contained in:
parent
7e51584832
commit
de41740bac
5 changed files with 40 additions and 35 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
http "net/http"
|
||||
sync "sync"
|
||||
|
||||
gs "git.dragonheim.net/dragonheim/gagent/internal/gstructs"
|
||||
gstructs "git.dragonheim.net/dragonheim/gagent/internal/gstructs"
|
||||
|
||||
prometheus "github.com/prometheus/client_golang/prometheus"
|
||||
promauto "github.com/prometheus/client_golang/prometheus/promauto"
|
||||
|
@ -27,12 +27,11 @@ var (
|
|||
or client node. Tags are used by the agent to give hints as to where
|
||||
it should be routed.
|
||||
*/
|
||||
func Main(wg *sync.WaitGroup, config gs.GagentConfig) {
|
||||
defer wg.Done()
|
||||
http.HandleFunc("/hello", answerClient)
|
||||
|
||||
func Main(wg *sync.WaitGroup, config gstructs.GagentConfig) {
|
||||
log.Printf("[INFO] Starting router\n")
|
||||
defer wg.Done()
|
||||
|
||||
http.HandleFunc("/hello", answerClient)
|
||||
clientSock, _ := zmq.NewSocket(zmq.ROUTER)
|
||||
defer clientSock.Close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue