Documentation
¶
Index ¶
Constants ¶
const DefaultInterface = "eth0"
DefaultInterface is the default public interface for the host that will be used for dhcp requests TODO replace this with kernel arg
Variables ¶
This section is empty.
Functions ¶
func InitNetwork ¶
func InitNetwork() (err error)
InitNetwork handles the initial network setup. This includes doing ifup for lo and eth0 and the initial ip addressing via dhcp for eth0
func SetupNetwork ¶
SetupNetwork configures the network interfaces based on userdata. If the userdata does not contain any network configuration, the default network setup done in InitNetwork is maintained and dhcpd is kicked off for eth0. nolint: gocyclo
func StaticAddress ¶
StaticAddress handles the setting of a static IP address on a network interface
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wrapper for 'networkd'.
It's not a standalone service, but it runs as a goroutine in init for now.
func NewService ¶
func NewService() *Service
NewService create backwards compatible entry logging to stderr
func (*Service) DHCPd ¶
DHCPd runs the dhclient process with a certain frequency to maintain a fresh dhcp lease