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
+10 -7
View File
@@ -28,16 +28,19 @@ func (m *Machine) String() string {
// FullName returns the Name of the machine including domain name
func (m *Machine) FullName() string {
if domain := m.zone.zones.domain; domain != "" {
var s = []string{
m.Name,
domain,
}
var name []string
return strings.Join(s, ".")
for _, s := range []string{
m.Name,
m.zone.zones.Name,
m.zone.zones.Domain,
} {
if s != "" {
name = append(name, s)
}
}
return m.Name
return strings.Join(name, ".")
}
// IsGateway tells if the Machine is a ring0 gateway