Merge branch 'pr-amery-toml' into next-amery
This commit is contained in:
@@ -10,15 +10,14 @@ import (
|
||||
// A Machine is a machine on a Zone
|
||||
type Machine struct {
|
||||
zone *Zone
|
||||
logger `toml:"-" json:"-" yaml:"-"`
|
||||
logger `json:"-" yaml:"-"`
|
||||
|
||||
ID int `toml:"id"`
|
||||
Name string `toml:"-" json:"-" yaml:"-"`
|
||||
ID int
|
||||
Name string `json:"-" yaml:"-"`
|
||||
|
||||
PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"`
|
||||
Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"`
|
||||
|
||||
CephMonitor bool `toml:"ceph_monitor,omitempty" json:"ceph_monitor,omitempty" yaml:"ceph_monitor,omitempty"`
|
||||
CephMonitor bool `json:"ceph_monitor,omitempty" yaml:"ceph_monitor,omitempty"`
|
||||
PublicAddresses []netip.Addr `json:"public,omitempty" yaml:"public,omitempty"`
|
||||
Rings []*RingInfo `json:"rings,omitempty" yaml:"rings,omitempty"`
|
||||
}
|
||||
|
||||
// revive:enable:line-length-limit
|
||||
|
||||
+3
-3
@@ -24,9 +24,9 @@ const (
|
||||
// RingInfo contains represents the Wireguard endpoint details
|
||||
// for a Machine on a particular ring
|
||||
type RingInfo struct {
|
||||
Ring int `toml:"ring"`
|
||||
Enabled bool `toml:"enabled,omitempty"`
|
||||
Keys wireguard.KeyPair `toml:"keys,omitempty"`
|
||||
Ring int
|
||||
Enabled bool
|
||||
Keys wireguard.KeyPair
|
||||
}
|
||||
|
||||
// Merge attempts to combine two RingInfo structs
|
||||
|
||||
+6
-7
@@ -88,12 +88,12 @@ func FilterMachines(m MachineIterator, cond func(*Machine) bool) (Machines, int)
|
||||
// Zone represents one zone in a cluster
|
||||
type Zone struct {
|
||||
zones *Zones
|
||||
logger `toml:"-" json:"-" yaml:"-"`
|
||||
logger `json:"-" yaml:"-"`
|
||||
|
||||
ID int `toml:"id"`
|
||||
Name string `toml:"name"`
|
||||
ID int
|
||||
Name string
|
||||
|
||||
Machines `toml:"machines"`
|
||||
Machines
|
||||
}
|
||||
|
||||
func (z *Zone) String() string {
|
||||
@@ -147,9 +147,8 @@ type Zones struct {
|
||||
resolver resolver.Resolver
|
||||
domain string
|
||||
|
||||
CephFSID uuid.UUID `toml:"ceph_fsid,omitempty" json:"ceph_fsid,omitempty" yaml:"ceph_fsid,omitempty"`
|
||||
|
||||
Zones []*Zone `toml:"zones"`
|
||||
CephFSID uuid.UUID `json:"ceph_fsid,omitempty" yaml:"ceph_fsid,omitempty"`
|
||||
Zones []*Zone
|
||||
}
|
||||
|
||||
// revive:enable:line-length-limit
|
||||
|
||||
Reference in New Issue
Block a user