Documentation
¶
Index ¶
- func AddGroup(name string) error
- func AddMounts(mounts []*api.Mount) error
- func AddSshAuthorizedKeys(user string, keys []string) error
- func AddUser(name, passwd string) error
- func AddUserToGroup(name, group string) error
- func Error(message string) error
- func ErrorE(message string, err error) error
- func ErrorEF(message string, err error, fields log.Fields) error
- func ErrorF(message string, fields log.Fields) error
- func Forge(mc *api.MachineConfig) error
- func ForgeHostname(hostname string) error
- func ForgeInterfaces(interfaces []*api.Interface) error
- func ForgePhy(ifx *api.Interface) error
- func ForgeRootfs() error
- func ForgeUsers(users []*api.User) error
- func ForgeVlan(ifx *api.Interface) error
- func ForgeVxlan(ifx *api.Interface) error
- func GetIds() ([]string, error)
- func ValidateAddress(addr string) bool
- func ValidateDHCP(dhcp string) bool
- type Entry
- type FSTab
- type FSTabFile
- type PosixUser
- type Section
- type SystemdConfig
- func (c SystemdConfig) MatchName(name string)
- func (c SystemdConfig) Netdev(name, kind string)
- func (c SystemdConfig) NetdevVlan(vid int)
- func (c SystemdConfig) SetAddress(value string)
- func (c SystemdConfig) SetDHCP(value string)
- func (c SystemdConfig) SetEntry(section, name, value string)
- func (c SystemdConfig) SetMtu(value int)
- func (c SystemdConfig) SetVlan(name string, vid int)
- func (c SystemdConfig) Write(name, kind string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSshAuthorizedKeys ¶
func AddUserToGroup ¶
func ErrorE ¶
Encapsulate err in a structured log and return an abstracted high-level error with message as the payload
func ErrorEF ¶
Encapsulate fields and err in a structured log and return an abstracted high-level error with message as the payload
func ErrorF ¶
Encapsulate fields in a structured log and return an abstracted high-level error with message as the payload
func Forge ¶
func Forge(mc *api.MachineConfig) error
Forge is the top level function responsible for implementing "forging" a set of foundry instructions onto a node
func ForgeHostname ¶ added in v0.1.5
func ForgeInterfaces ¶
func ForgeRootfs ¶ added in v0.1.8
func ForgeRootfs() error
func ForgeUsers ¶
func ValidateAddress ¶
func ValidateDHCP ¶ added in v0.1.11
Types ¶
type FSTabFile ¶ added in v0.1.11
type FSTabFile struct {
// Entries is a linux user to FsTab Entry, the user key, tells us how to chown the directory
// username: /mnt, /dev, ...
Entries map[string][]*FSTab
}
FSTabFile wraps all the FSTab entries in /etc/fstab
func (*FSTabFile) AddFSTabEntry ¶ added in v0.1.11
AddFSTabEntry places entries into fstab for durability
func (*FSTabFile) FSTabParse ¶ added in v0.1.11
FSTabParse parses fstab file
func (*FSTabFile) FSTabWrite ¶ added in v0.1.11
FSTabWrite writes out the fstab file
func (*FSTabFile) FindEntryByDevice ¶ added in v0.1.11
FindEntryByDevice checks fstab file for an entry using specified device
type PosixUser ¶
func GetPosixUser ¶
type SystemdConfig ¶
func Read ¶ added in v0.1.6
func Read(filename string) (SystemdConfig, error)
func (SystemdConfig) MatchName ¶
func (c SystemdConfig) MatchName(name string)
func (SystemdConfig) Netdev ¶ added in v0.1.6
func (c SystemdConfig) Netdev(name, kind string)
func (SystemdConfig) NetdevVlan ¶ added in v0.1.6
func (c SystemdConfig) NetdevVlan(vid int)
func (SystemdConfig) SetAddress ¶
func (c SystemdConfig) SetAddress(value string)
func (SystemdConfig) SetDHCP ¶ added in v0.1.11
func (c SystemdConfig) SetDHCP(value string)
SetDHCP configues systemd-networkd's dhcp value
func (SystemdConfig) SetEntry ¶
func (c SystemdConfig) SetEntry(section, name, value string)
func (SystemdConfig) SetMtu ¶ added in v0.1.6
func (c SystemdConfig) SetMtu(value int)
func (SystemdConfig) SetVlan ¶ added in v0.1.6
func (c SystemdConfig) SetVlan(name string, vid int)
func (SystemdConfig) Write ¶
func (c SystemdConfig) Write(name, kind string) error