pkg/localconfig/host.go
Mikaël Cluseau 68c87509f2 wip
2018-12-10 21:52:14 +11:00

31 lines
411 B
Go

package localconfig
import (
"io"
yaml "gopkg.in/yaml.v2"
)
type Host struct {
Name string
MACs []string
IPs []string
IPXE string
Kernel string
Initrd string
Versions map[string]string
Config string
}
func (h *Host) WriteHashDataTo(w io.Writer) error {
return yaml.NewEncoder(w).Encode(Host{
Kernel: h.Kernel,
Initrd: h.Initrd,
Versions: h.Versions,
Config: h.Config,
})
}