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)
- type EnvFile
- type EtcHosts
- type Etcd
- type Etcd2
- type File
- type Flannel
- type Fleet
- type Locksmith
- type OEM
- 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.
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 Etcd2 ¶ added in v1.4.0
Etcd2 is a top-level structure which embeds its underlying configuration, config.Etcd2, 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 Flannel ¶ added in v0.11.1
flannel is a top-level structure which embeds its underlying configuration, config.Flannel, and provides the system-specific Unit().
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 Locksmith ¶ added in v1.0.2
Locksmith is a top-level structure which embeds its underlying configuration, config.Locksmith, 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(), Type(), and Group().
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).
func (Unit) DropInDestination ¶ added in v1.0.0
func (u Unit) DropInDestination(root string, dropIn config.UnitDropIn) string
DropInDestination builds the appropriate absolute file path for the UnitDropIn. The root argument indicates the effective base directory of the system (similar to a chroot) and the dropIn argument is the UnitDropIn for which the destination is being calculated.
type UnitManager ¶ added in v0.9.0
type UnitManager interface { PlaceUnit(unit Unit) error PlaceUnitDropIn(unit Unit, dropIn config.UnitDropIn) error EnableUnitFile(unit Unit) error RunUnitCommand(unit Unit, command string) (string, error) MaskUnit(unit Unit) error UnmaskUnit(unit Unit) error DaemonReload() 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().