cluster: make domain, basedir and cluster name public fields

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-10 21:38:07 +00:00
parent 828d95aa3b
commit 3e45a56cd1
4 changed files with 41 additions and 37 deletions
+3 -3
View File
@@ -9,13 +9,13 @@ type Config struct {
}
var cfg = &Config{
Base: "./m",
Domain: "m.jpi.cloud",
Base: "m",
Domain: "jpi.cloud",
}
// LoadZones loads all zones and machines in the config directory
func (cfg *Config) LoadZones(resolve bool) (*cluster.Cluster, error) {
return cluster.New(cfg.Base, cfg.Domain,
return cluster.NewFromDirectory(cfg.Base, cfg.Domain,
cluster.ResolvePublicAddresses(resolve),
cluster.WithLogger(log),
)