Ajout wazuh
This commit is contained in:
20
wazuh-agent-k8s-autoadd/internal/config/config.go
Normal file
20
wazuh-agent-k8s-autoadd/internal/config/config.go
Normal file
@ -0,0 +1,20 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/caarlos0/env/v11"
|
||||
"log"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
BaseURL string `env:"WAZUH_MANAGER_BASE_URL,required,notEmpty"`
|
||||
}
|
||||
|
||||
func NewConfig() (*Config, error) {
|
||||
cfg := &Config{}
|
||||
if err := env.Parse(cfg); err != nil {
|
||||
log.Print(err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
Reference in New Issue
Block a user