Documentation ¶
Index ¶
- Constants
- func AuthorizeSSHKeys(user string, keysName string, keys []string) error
- func CreateUser(u *config.User) error
- func DefaultReadConfig() (io.Reader, error)
- func EnsureDirectoryExists(dir string) error
- func ExecuteScript(scriptPath string) (string, error)
- func Hostname() (string, error)
- func MachineID(root string) string
- func RestartNetwork(interfaces []network.InterfaceGenerator) (err error)
- func SetHostname(hostname string) error
- func SetUserPassword(user, hash string) error
- func UserExists(u *config.User) bool
- func WriteEnvFile(ef *EnvFile, root string) error
- func WriteFile(f *File, root string) (string, error)
- func WriteNetworkdConfigs(interfaces []network.InterfaceGenerator) error
- type EnvFile
- type EtcHosts
- type Etcd
- type File
- type Fleet
- type OEM
- type Script
- type Unit
- type UnitManager
- type Update
Constants ¶
const DefaultIpv4Address = "127.0.0.1"
Variables ¶
This section is empty.
Functions ¶
func AuthorizeSSHKeys ¶
Add the provide SSH public key to the core user's list of authorized keys
func CreateUser ¶
func DefaultReadConfig ¶ added in v0.10.4
func EnsureDirectoryExists ¶
func ExecuteScript ¶
func RestartNetwork ¶ added in v0.7.4
func RestartNetwork(interfaces []network.InterfaceGenerator) (err error)
func SetHostname ¶
func SetUserPassword ¶
func UserExists ¶
func WriteEnvFile ¶ added in v0.8.8
WriteEnvFile updates an existing env `KEY=value` formated file with new values provided in EnvFile.Vars; File.Content is ignored. Existing ordering and any unknown formatting such as comments are preserved. If no changes are required the file is untouched.
func WriteNetworkdConfigs ¶ added in v0.7.4
func WriteNetworkdConfigs(interfaces []network.InterfaceGenerator) error
Types ¶
type Etcd ¶ added in v0.10.4
Etcd is a top-level structure which embeds its underlying configuration, config.Etcd, and provides the system-specific Unit().
type File ¶
File is a top-level structure which embeds its underlying configuration, config.File, and provides the system-specific Permissions().
type Fleet ¶ added in v0.10.4
Fleet is a top-level structure which embeds its underlying configuration, config.Fleet, and provides the system-specific Unit().
type OEM ¶ added in v0.10.4
OEM is a top-level structure which embeds its underlying configuration, config.OEM, and provides the system-specific File().
type Unit ¶
Unit is a top-level structure which embeds its underlying configuration, config.Unit, and provides the system-specific Destination().
func (*Unit) Destination ¶ added in v0.7.5
Destination builds the appropriate absolute file path for the Unit. The root argument indicates the effective base directory of the system (similar to a chroot).
type UnitManager ¶ added in v0.9.0
type UnitManager interface { PlaceUnit(unit *Unit, dst string) error EnableUnitFile(unit string, runtime bool) error RunUnitCommand(command, unit string) (string, error) DaemonReload() error MaskUnit(unit *Unit) error UnmaskUnit(unit *Unit) error }
func NewUnitManager ¶ added in v0.9.0
func NewUnitManager(root string) UnitManager
type Update ¶ added in v0.10.4
Update is a top-level structure which contains its underlying configuration, config.Update, a function for reading the configuration (the default implementation reading from the filesystem), and provides the system-specific File() and Unit().