Compare commits
4 Commits
379794cedd
..
v0.5.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c32b88e24 | |||
| 1bca1f7da1 | |||
| 5e5958d22e | |||
| 45447275a7 |
@@ -10,6 +10,8 @@ import (
|
|||||||
// A Machine is a machine on a Zone
|
// A Machine is a machine on a Zone
|
||||||
type Machine struct {
|
type Machine struct {
|
||||||
zone *Zone
|
zone *Zone
|
||||||
|
logger
|
||||||
|
|
||||||
ID int `toml:"id"`
|
ID int `toml:"id"`
|
||||||
Name string `toml:"-" json:"-" yaml:"-"`
|
Name string `toml:"-" json:"-" yaml:"-"`
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type ScanOptions struct {
|
|||||||
|
|
||||||
// Logger specifies the logger to be used. otherwise
|
// Logger specifies the logger to be used. otherwise
|
||||||
// the scanner will be mute
|
// the scanner will be mute
|
||||||
Logger slog.Logger
|
slog.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResolvePublicAddresses instructs the scanner to use
|
// ResolvePublicAddresses instructs the scanner to use
|
||||||
|
|||||||
+6
-4
@@ -32,8 +32,9 @@ func (m *Zones) scanDirectory(_ *ScanOptions) error {
|
|||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
if e.IsDir() {
|
if e.IsDir() {
|
||||||
z := &Zone{
|
z := &Zone{
|
||||||
zones: m,
|
zones: m,
|
||||||
Name: e.Name(),
|
logger: m,
|
||||||
|
Name: e.Name(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := z.scan(); err != nil {
|
if err := z.scan(); err != nil {
|
||||||
@@ -132,8 +133,9 @@ func (z *Zone) scan() error {
|
|||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
if e.IsDir() {
|
if e.IsDir() {
|
||||||
m := &Machine{
|
m := &Machine{
|
||||||
zone: z,
|
zone: z,
|
||||||
Name: e.Name(),
|
logger: z,
|
||||||
|
Name: e.Name(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := m.init(); err != nil {
|
if err := m.init(); err != nil {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ func FilterMachines(m MachineIterator, cond func(*Machine) bool) (Machines, int)
|
|||||||
// Zone represents one zone in a cluster
|
// Zone represents one zone in a cluster
|
||||||
type Zone struct {
|
type Zone struct {
|
||||||
zones *Zones
|
zones *Zones
|
||||||
|
logger
|
||||||
|
|
||||||
ID int `toml:"id"`
|
ID int `toml:"id"`
|
||||||
Name string `toml:"name"`
|
Name string `toml:"name"`
|
||||||
|
|||||||
Reference in New Issue
Block a user