f-8: code: use db for database config #8
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 1m5s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m48s
Pre Release Workflow / build (meta_cli, amd64, linux) (push) Successful in 1m27s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m28s
Pre Release Workflow / prerelease (push) Successful in 12s

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2025-12-30 22:31:19 +01:00
commit d2bc7e5b7a
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
4 changed files with 92 additions and 33 deletions

View file

@ -2,29 +2,26 @@ package main
import (
"flag"
"log"
"git.g3e.fr/syonad/two/internal/metadata"
)
var (
iface = flag.String("interface", "0.0.0.0", "Interface IP à écouter")
port = flag.Int("port", 8080, "Port à utiliser")
file = flag.String("file", "", "Fichier JSON contenant les données NoCloud")
port = flag.Int("port", 0, "Port à utiliser")
netns_name = flag.String("netns", "", "Network namespace à utiliser")
conf_file = flag.String("conf", "/etc/two/agent.yml", "configuration file")
vm_name = flag.String("vm", "", "Name of the vm")
)
func main() {
flag.Parse()
if *file == "" {
log.Fatal("Vous devez spécifier un fichier via --file")
}
metadata.StartServer(metadata.Config{
Netns: *netns_name,
File: *file,
Iface: *iface,
Port: *port,
Netns: *netns_name,
Iface: *iface,
Port: *port,
ConfFile: *conf_file,
VmName: *vm_name,
})
}