pkg/localconfig/host.go

29 lines
381 B
Go
Raw Normal View History

2018-12-10 07:28:24 +00:00
package localconfig
import (
"io"
yaml "gopkg.in/yaml.v2"
)
type Host struct {
Name string
MACs []string
IPs []string
Kernel string
Initrd string
Layers map[string]string
Config []byte
}
func (h *Host) WriteHashDataTo(w io.Writer) error {
return yaml.NewEncoder(w).Encode(Host{
Kernel: h.Kernel,
Initrd: h.Initrd,
Layers: h.Layers,
Config: h.Config,
})
}