From 066b90dff45a1e4db560799def3dc7e1251eb4a5 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Tue, 21 Apr 2026 21:27:19 +0200 Subject: [PATCH] f-21: code: add interface name in config Signed-off-by: GnomeZworc --- conf/agent/config.exemple.yml | 7 ++++++- internal/config/agent/struct.go | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/agent/config.exemple.yml b/conf/agent/config.exemple.yml index a2b9f1b..5bd1dfd 100644 --- a/conf/agent/config.exemple.yml +++ b/conf/agent/config.exemple.yml @@ -1,2 +1,7 @@ database: - path: "/var/lib/two/data/" \ No newline at end of file + path: "/var/lib/two/data/" + +interfaces: + vms: br-000000 + internet: br-000000 + admin: br-000000 \ No newline at end of file diff --git a/internal/config/agent/struct.go b/internal/config/agent/struct.go index 24ad0f5..21dde0d 100644 --- a/internal/config/agent/struct.go +++ b/internal/config/agent/struct.go @@ -20,6 +20,7 @@ type Config struct { Count int `mapstructure:"count"` BufferSize int `mapstructure:"buffer_size"` } `mapstructure:"worker"` + Interfaces map[string]string `mapstructure:"interfaces"` } func LoadConfig(path string) (*Config, error) {